Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XWIKI-22492: Livedata filter options are misread #3700

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 29, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-22492

Changes

Description

  • Added a bit of semantics on the options
  • Added a live update region for the state of the active option.

Clarifications

  • There is still the blank text which is repeted with NVDA (idk where it comes from and from what I could see online noone found it out). However, now it's followed by the content of the option. This makes the dropdown useable (even if not perfect), before it was barely usable.

Screenshots & Video

This is a test with Orca, the most popular screen reader for Linux. Results are similar to NVDA, but it doesn't read out blank for each entry.
https://github.com/user-attachments/assets/5927a1bf-6232-4a54-a46c-e4a40f60f388

Executed Tests

Manual tests only, see above. With a search of .selectize in the code base, no test object seemed broken:
https://github.com/search?q=repo%3Axwiki%2Fxwiki-platform%20.selectize&type=code

We only added semantics and attributes, there shouldn't be any selector breaking.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.10.X

* Added a bit of semantics on the options
* Added a live update region for the state of the `active` option.
* Fixed when navigating with arrows and validating with Enter.
this.liveRegion.text("");
}
}
oldSetActiveOption.call(this, option, scroll, animate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
oldSetActiveOption.call(this, option, scroll, animate);
return oldSetActiveOption.call(this, option, ...args);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setActiveOption from selectize.js does not return anything. I updated to use the rest arguments but did not add a return here. I doubt it makes a difference though.
Addressed in 017fe21 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated to use the rest arguments but did not add a return here. I doubt it makes a difference though.

It can make a difference if setActiveOption starts returning a value in future versions of Selectize. I find it safer to return whatever the overridden function returns (even if that function doesn't return anything in its current version).

* Fixed function name
* Fixed the faulty overridding
* Improved comments
* Fixed the faulty overridding
* Fixed codestyle
* Simplified code
@Sereza7
Copy link
Contributor Author

Sereza7 commented Jan 8, 2025

Tested manually again after 017fe21 , I did not find regressions that would have sneaked in with the recent fixes.

@Sereza7 Sereza7 requested a review from mflorea January 8, 2025 17:25
Copy link
Member

@mflorea mflorea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with a minor comment.

* Improved stability of the function overriding implementation

Co-authored-by: Marius Dumitru Florea <[email protected]>
@Sereza7 Sereza7 requested a review from mflorea January 13, 2025 16:45
Copy link
Member

@mflorea mflorea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@mflorea mflorea merged commit 88e3e7d into xwiki:master Jan 13, 2025
mflorea pushed a commit that referenced this pull request Jan 13, 2025
* Added a bit of semantics on the options
* Added a live update region for the state of the `active` option.
* Fixed when navigating with arrows and validating with Enter.

(cherry picked from commit 88e3e7d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants