pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 443 forks source link

Improve UI/UX of file attachments in new Composer UI #7799

Closed NateWr closed 2 years ago

NateWr commented 2 years ago

Describe the problem you would like to solve The file attachments UI components work fine in the new Composer component. However, they have not been styled appropriately. In some cases they are missing styles completely.

Describe the solution you'd like The following needs to be done:

Who is asking for this feature? Finishing work on #5717.

NateWr commented 2 years ago

I decided to leave the following two features for later. They are nice to have but not urgent:

Otherwise, the following PRs apply styles to the file attacher, introduce a new ActionPanel component, and fix the various accessibility focus issues. They also apply the ActionPanel component to the admin page.

admin

PRs: https://github.com/pkp/ui-library/pull/193 https://github.com/pkp/pkp-lib/pull/7811 https://github.com/pkp/ojs/pull/3354 https://github.com/pkp/omp/pull/1094 https://github.com/pkp/ops/pull/258

NateWr commented 2 years ago

@ewhanson would you be able to do a code review on this? I'm particularly interested in having you check the keyboard navigation functionality. This fixes some focus bugs related to accessibility, and those tend to be where there are differences between browsers, and since you're on Mac we're likely to get some different behaviour.

To test in the UI Library:

To test in OJS:

ewhanson commented 2 years ago

Hey @NateWr, I'll have a look. Thanks!

ewhanson commented 2 years ago

Hey @NateWr, I've reviewed the code and done some keyboard navigation testing. The code all looked good, but I ran into a few issues with Firefox on Mac and (perhaps not surprisingly) a number of issues with Safari on Mac. Anything that came up in Firefox was also applicable in Safari.

This also wasn't explicitly in this PR, but the readme file for the FileAttacher component still has placeholder text in it (This is some text.).

Firefox

Composer (UI Library)

In OJS

Safari

ActionPanel (UI Library)

Composer (UI Library)

In OJS

NateWr commented 2 years ago

After a short call with Erik, the issues were all related to a system default in Mac that alters keyboard navigation. :sweat_smile:

I've merged all the PRs to main.