r1tsuu/payload-enchants

docs-reorder: Save button not showing

Opened this issue · 6 comments

The dialog will show up, I can drag-and-drop the items, but the "Save" button is not showing so I cannot save my changes. The "close" button is also out of function.

I'm using payload v3.0.0-beta.67.

An error is logged in the browser when opening the dialog:

`DialogContent` requires a `DialogTitle` for the component to be accessible for screen reader users.

If you want to hide the `DialogTitle`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/dialog

index.mjs:466 Warning: Missing `Description` or `aria-describedby={undefined}` for {DialogContent}.

As there were many breaking changes since i last checked this plugin, this could be.. I did only quick fixes on a typescript level
I'm also considering to just remove Radix dependency and use Modal from @payloadcms/ui like in my translator plugin.

Thanks

Strangely, it seems like it works for @genox he even had a PR fix not lately to this plugin #87 but could be that something was just introduced

Strangely, it seems like it works for @genox he even had a PR fix not lately to this plugin #87 but could be that something was just introduced

I had the same issue before and after PR #87

I am using the plugin without issues in another project which uses payload v3.0.0-beta.32 and react 18.2.0, so maybe it has something to do with Radix and React 19?

I can see the following behaviour on my latest beta/latest everything setup:

  1. The close button is not visible at all. The inline SVG is there, the dimensions seem to be right, font color is fine - but it is not displaying the icon. it is clickable though. So I assume this is probably a styling issue, not a functional issue.
Screenshot 2024-07-20 at 08 24 07
  1. The save button only shows up if there was a change to the list order. I assume this is the desired behaviour. In terms of UX, a disabled Save button that is enabled on change with a cancel button next to it might be better as seeing nothing implies something is missing. :)

edit: The console error is ARIA specific - I do not think that this has functional implications. The fix for this is as simple as providing the mentioned attribute on the component.

will fix it here #91 as well with updating Payload