Skip to content

[XWI-128] Select wiki to create main pages when creating new pages - #24601

Open
shiroginne wants to merge 2 commits into
devfrom
feature/xwi-128-select-wiki-to-create-main-pages-when-creating-new-pages
Open

[XWI-128] Select wiki to create main pages when creating new pages#24601
shiroginne wants to merge 2 commits into
devfrom
feature/xwi-128-select-wiki-to-create-main-pages-when-creating-new-pages

Conversation

@shiroginne

Copy link
Copy Markdown
Contributor

Ticket

XWI-128

What are you trying to accomplish?

This ticket implements 2 new things:

  • allows searching not only by pages, but also by their parents
  • allows choosing not only pages, but also their parents and wikis

Screenshots

Screenshot 2026-08-04 at 17 03 33

What approach did you choose and why?

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@shiroginne
shiroginne requested a review from a team August 4, 2026 15:04
@shiroginne shiroginne self-assigned this Aug 4, 2026
@NobodysNightmare

Copy link
Copy Markdown
Contributor

After reading the PR description, I started with a click-review first:

This ticket implements 2 new things:

  • allows searching not only by pages, but also by their parents
  • allows choosing not only pages, but also their parents and wikis

Most of the things that were changed here surprised me. The one thing that I expected to change was "allows choosing [...] wikis", at least when looking at the related work package.

I did not expect:

  • allows choosing their parents
  • allows searching by their parents

The first one, I don't have a huge problem with. If it's visible in the search result, I understand why you should be able to click it. However, I already said this weeks ago and back then the consensus was to not do this. Did this change? The linked ticket is not about this, so I am asking.

The second one - searching by parents - I think I am not a fan of. Here's a test search I performed:

image

I now receive the entire hierarchy below my search term as a result as well. This doesn't look right. If there were two pages matching my search, I'd easily miss the second one, because the hierarchy below the first result is easily too huge.

WikiPage.visible(user).find_by(id: identifier)
def create_root_page(input_data, user:)
wiki = Wiki.find_by(id: input_data.parent_identifier)
return failure(code: :not_found) unless wiki&.visible?(user)

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.

🟢 Isn't there a visible scope available for Wiki so that the finding could already be done as Wiki.visible.find_by?

@NobodysNightmare

Copy link
Copy Markdown
Contributor

So the following is also not a requirement that's written in the ticket above, but I wanted to bring it here for discussion. Let's take the following wiki structure (search term is just an example, not important):

image

You can see that a project called "Demo project" exists. Imagine I wanted to create a new root wiki page in the demo project. What would I be searching for? I'd search for "Demo project, wouldn't I?

image

@shiroginne

Copy link
Copy Markdown
Contributor Author

You can see that a project called "Demo project" exists. Imagine I wanted to create a new root wiki page in the demo project. What would I be searching for? I'd search for "Demo project, wouldn't I?

That's a bug for the internal provider; I'll made a fix for it 😅

@shiroginne

Copy link
Copy Markdown
Contributor Author

I did not expect:
allows choosing their parents
allows searching by their parents

The first one, I don't have a huge problem with. If it's visible in the search result, I understand why you should be able to click it. However, I already said this weeks ago and back then the consensus was to not do this. Did this change? The linked ticket is not about this, so I am asking.

When we were discussing this ticket with @Kharonus, he showed me an example: here is the search by the pages; I see that the page has a parent; I need to be able to search by parent and choose it. I hope I got it right. And the implementation is reflecting it. I think it's a nice feature; for example: you forgot the name of the parent page, but you remember the page name, you search for the page and then choose the parent as a parent for a new page 🤔

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