apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

Unable to join to a specific page type and confusing UI feedback

Open abea opened this issue 5 years ago • 1 comments

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 setwithType 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.

abea avatar Feb 04 '20 16:02 abea

Yeah, that's not ideal. We could come up with something where a means to launch a manager for individual page types does exist and it launches the generic page manager with only pages of the proper type checkable. We could also just lock the browse button door and limit it to autocomplete only, for 2.x.

Note also that the user might change the page type later, in which case... the join would no longer fetch it, which I guess is a reasonable outcome.

On Tue, Feb 4, 2020 at 11:26 AM Alex Bea [email protected] wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/2142?email_source=notifications&email_token=AAAH27MB6JFACHBPPKMDM33RBGJLFA5CNFSM4KPZ5BY2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IK6LSTQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27OGOV46OZDKRHHYK2LRBGJLFANCNFSM4KPZ5BYQ .

--

THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his

boutell avatar Feb 05 '20 13:02 boutell