Skip to content

Conversation

@danxuliu
Copy link
Member

The dialog to enter a name for the compressed file is based in a standard OC.dialogs.prompt, but with some adjustments, like the button labels. The adjustment relies on the whole dialog containing only two buttons (those from the button row), which was true in the past. However, due to the accesibility fixes the dialog now (Nextcloud >= 25.0.5, 26.0.0 and master) contains an extra button to close the dialog, which alters the expected order of the buttons to modify and causes the labels to be wrongly assigned.

To fix that the query to select the buttons to modify is restricted only to those in the button row, which behaves as expected in the whole range of supported versions (from Nextcloud 22 to Nextcloud 27).

🖼️ Screenshots

🏚️ Before 🏡 After
Zipper-Compress-Dialog-Buttons-Before Zipper-Compress-Dialog-Buttons-After

How to test

  • Use Nextcloud server >= 25.0.5, 26.0.0 or master
  • Enable the files_zip / Zipper app
  • Open the Files app
  • Open the menu for a file
  • Compress to Zip

Result with this pull request

The buttons in the button row are labeled Cancel and Compress files

Result without this pull request

The buttons in the button row are labeled Compress files and Yes, and the close button is labeled Cancel, which overflows its boundaries

The dialog to enter a name for the compressed file is based in a
standard "OC.dialogs.prompt", but with some adjustments, like the button
labels. The adjustment relies on the whole dialog containing only two
buttons (those from the button row), which was true in the past.
However, due to the accesibility fixes the dialog now contains an extra
button to close the dialog, which alters the expected order of the
buttons to modify and causes the labels to be wrongly assigned.

To fix that the query to select the buttons to modify is restricted only
to those in the button row, which behaves as expected in the whole range
of supported versions (from Nextcloud 22 to Nextcloud 27).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@juliusknorr juliusknorr merged commit 3593fdc into main May 15, 2023
@juliusknorr juliusknorr deleted the fix-button-labels-in-dialog branch May 15, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants