apostrophecms / apostrophecms/apostrophe
Unable to join to a specific page type and confusing UI feedback
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 650
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 23
Description
Steps to reproduce the behavior:
1. Create a specific page type, such as an index page (e.g., `events-pages`).
2. In a widget or somewhere else, create a `joinByOne` field and set`withType` to `events-page`.
3. Start up the app, create a page of the that type, and then open the widget with the joinByOne field.
4. Start typing in the name of the page. It should appear as expected. Click the "Browse" button to use it that way.
**Expected behavior**
The "Browse" button should open a manager to select a page.
Alternatively, we could set `withType` to `apostrophe-page`. Then in `filters` set `type: 'events-page'`. We should expect the same behavior.
**Describe the bug**
In the first case, the "Browse" button does nothing. An error is thrown in the console that there is no manager modal for that piece type (which is true for individual page types).
In the second case (joining to `apos-page` with a filter), The "Browse" button works, opens the pages manager modal, and saves correctly if you choose the right page type. If you choose another page type, it seems to save, but there's no page visibly selected in the join field. Typing in names works similarly. Typing in and selecting a page of the right type saves correctly. Typing in and selecting a page of the wrong type generates an autocomplete option for the bad page, but clicking it seemingly does nothing. No page is selected.
Contributor guide
Research direction
Reproduce both joinByOne cases with a page-type restriction, then inspect the Browse button, manager modal selection, autocomplete results, and the browser console error. Done means Browse opens an appropriate manager for specific page types and invalid page types cannot be selected or saved in either configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100