Skip to content

[#73350] Use single selection tree view with search for page selection#23493

Merged
Kharonus merged 2 commits into
devfrom
implementation/73350-add-search-wiki-page-dialog
Jun 3, 2026
Merged

[#73350] Use single selection tree view with search for page selection#23493
Kharonus merged 2 commits into
devfrom
implementation/73350-add-search-wiki-page-dialog

Conversation

@Kharonus

@Kharonus Kharonus commented Jun 1, 2026

Copy link
Copy Markdown
Member

Ticket

#73350

What are you trying to accomplish?

  • render search pages results in a (flat) tree view
  • use tree view selection to select the page to add

What approach did you choose and why?

  • use filterable tree view with server-side filtering

@Kharonus Kharonus requested a review from a team June 1, 2026 14:46
@github-actions

github-actions Bot commented Jun 1, 2026

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

@Kharonus Kharonus force-pushed the implementation/73350-add-search-wiki-page-dialog branch from 04368ef to 9d17a54 Compare June 1, 2026 14:50
Comment thread modules/wikis/app/forms/wikis/link_existing_wiki_page_form.rb
Comment thread modules/wikis/app/controllers/wikis/search_pages_controller.rb
Comment thread modules/wikis/app/controllers/wikis/search_pages_controller.rb Outdated
Comment thread modules/wikis/app/controllers/wikis/search_pages_controller.rb Outdated
@NobodysNightmare

Copy link
Copy Markdown
Contributor

🟢 Looks-related question: Should we also add a "document" icon in front of search results?

Currently it doesn't look like a list of things when I have many results. I'd hope that a leading icon would help me understand that this is a list of wiki pages...

image

@NobodysNightmare

Copy link
Copy Markdown
Contributor

Probably a feedback for the tree view, rather than for this PR: When the search text does not exactly appear in the resulting tree view, then nothing is highlighted.

I guess this is acceptable for now, but should we track it as a bug?

image

CC @HDinger

@HDinger

HDinger commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Probably a feedback for the tree view, rather than for this PR: When the search text does not exactly appear in the resulting tree view, then nothing is highlighted.

I guess this is acceptable for now, but should we track it as a bug?
image

CC @HDinger

Yes, I noticed that on my branch as well. I think a separate bug makes sense 👍

@Kharonus Kharonus force-pushed the implementation/73350-add-search-wiki-page-dialog branch from 03f82b1 to 67b53bb Compare June 3, 2026 07:43
@Kharonus Kharonus requested a review from NobodysNightmare June 3, 2026 07:44
@Kharonus Kharonus force-pushed the implementation/73350-add-search-wiki-page-dialog branch 2 times, most recently from f575027 to 4ec38b7 Compare June 3, 2026 07:49
Comment thread modules/wikis/app/components/wikis/link_existing_wiki_page_dialog.html.erb Outdated
@NobodysNightmare

Copy link
Copy Markdown
Contributor

🔴 I guess this is a bug in the selectable tree view, but it affects us a lot:

Screencast.from.2026-06-03.10-48-21.webm

What do you see? When there are multiple pages with the same name (but different values) you can only select the first one.

This is bad, because our internal wikis have a lot of different root pages that commonly have the same name. While this is also a reminder that we should add additional information to the nodes, it's surprising to me that the selection doesn't work in this case.

@Kharonus

Kharonus commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

🔴 I guess this is a bug in the selectable tree view, but it affects us a lot:

Screencast.from.2026-06-03.10-48-21.webm
What do you see? When there are multiple pages with the same name (but different values) you can only select the first one.

This is bad, because our internal wikis have a lot of different root pages that commonly have the same name. While this is also a reminder that we should add additional information to the nodes, it's surprising to me that the selection doesn't work in this case.

Oh, you are right. I also noticed it, and I wanted to talk to @HDinger about it. The main issue is, that the tree view component identifies its items by the path, not a hidden identifier below. The question now is, should we try to fix that or basically wait until we have the hierarchy, which fixes then at least the page that have different ancestors.

BUT: In a wiki it is NOT disallowed, to have pages with the same title under the same parent. This is true for both, our internal wiki AND XWiki. So, we won't be able to catch every case with unique paths. Will take that into discussion, but I think, it shouldn't be a blocker to this PR, which only introduces the component in a not final way.

UPDATE: Bug ticket was created: https://community.openproject.org/wp/SDS-704

@Kharonus Kharonus force-pushed the implementation/73350-add-search-wiki-page-dialog branch from 4ec38b7 to 87b0d62 Compare June 3, 2026 10:18
@Kharonus Kharonus requested a review from NobodysNightmare June 3, 2026 10:19
Kharonus added 2 commits June 3, 2026 12:21
- use new filterable tree view component with server side filtering
- remove unused classes and methods
- add document icon for page results
- add comment to disabled authorization
- moved filterable tree to the form class
@Kharonus Kharonus force-pushed the implementation/73350-add-search-wiki-page-dialog branch from 87b0d62 to e9157b8 Compare June 3, 2026 10:22
@Kharonus Kharonus merged commit 1484837 into dev Jun 3, 2026
16 of 17 checks passed
@Kharonus Kharonus deleted the implementation/73350-add-search-wiki-page-dialog branch June 3, 2026 13:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants