Skip to content

[#73356] show relation page links in the wiki tab#22737

Open
Kharonus wants to merge 3 commits intofeature/72971-show-inline-wiki-page-linksfrom
implementation/73356-show-existing-relation-wiki-page-links
Open

[#73356] show relation page links in the wiki tab#22737
Kharonus wants to merge 3 commits intofeature/72971-show-inline-wiki-page-linksfrom
implementation/73356-show-existing-relation-wiki-page-links

Conversation

@Kharonus
Copy link
Copy Markdown
Member

Ticket

#73356

What are you trying to accomplish?

  • Show relation page links for a work package

What approach did you choose and why?

  • add new link group for relation page links
  • add button for adding links - still disabled
  • add action menu for link removal - no functionality

@Kharonus Kharonus requested a review from a team April 13, 2026 12:15
@Kharonus Kharonus self-assigned this Apr 13, 2026
@github-actions
Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

- https://community.openproject.org/work_packages/73356
- add new link group for relation page links
- add button for adding links - still disabled
- add action menu for link removal - no functionality
@Kharonus Kharonus force-pushed the implementation/73356-show-existing-relation-wiki-page-links branch from 13cad6e to fc6975e Compare April 13, 2026 12:16
…ntation/73356-show-existing-relation-wiki-page-links
container.with_row do
render(Primer::Beta::Blankslate.new(border: false)) do |empty_placeholder|
empty_placeholder.with_heading(tag: :h2).with_content(t(".empty_heading"))
empty_placeholder.with_description { t(".empty_text") }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in the previous PR: Let's rename empty_placeholder to blankslate for brevity and clarity.

belongs_to :linkable, polymorphic: true

def relation?
is_a?(RelationPageLink)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about implementing these by choice, not by subclass? The behaviour would be the same, just the way we implement it would be different:

# page_link.rb
def relation? = false
def inline? = false

# relation_page_link.rb
def relation? = true

# inline_page_link.rb
def inline? = true

This would mean that:

  • the superclass doesn't need to have knowledge about the subclasses implementing it
  • it's clearer when looking at a subclass why it responds to certain methods

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think that's fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants