r1tsuu / payload-enchants

Payload 3.0 enchantment packages
MIT License
117 stars 7 forks source link

docs-reorder: Save button not showing #88

Open linobino1 opened 1 month ago

linobino1 commented 1 month ago

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}.
r1tsuu commented 1 month ago

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

r1tsuu commented 1 month ago

Strangely, it seems like it works for @genox he even had a PR fix not lately to this plugin https://github.com/r1tsuu/payload-enchants/pull/87 but could be that something was just introduced

linobino1 commented 1 month ago

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 https://github.com/r1tsuu/payload-enchants/pull/87

linobino1 commented 1 month ago

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?

genox commented 1 month ago

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

2) 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.

r1tsuu commented 1 month ago

will fix it here https://github.com/r1tsuu/payload-enchants/pull/91 as well with updating Payload