[MGNLUI-7538] LocaleSelector's popup menu scrolls to selected item as default behavior Created: 27/Sep/22  Updated: 30/Oct/23  Resolved: 17/Oct/22

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.24
Fix Version/s: 6.3.0, 6.2.26

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Quach Hao Thien
Resolution: Fixed Votes: 4
Labels: VN-Maintenance
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 2d 5.5h Time Spent: 2d 5.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: File config.modules.multisite.config.sites.fallback.i18n.locales.yaml    
Issue Links:
Problem/Incident
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-7558 Provide PR Sub-task Completed Quach Hao Thien  
MGNLUI-7559 Review Sub-task Completed Roman Kovařík  
MGNLUI-7560 PreintQA Sub-task Completed Adam Siska  
MGNLUI-7561 QA Sub-task Completed Adam Siska  
MGNLUI-7575 Docu: describe this behaviour without... Sub-task Completed Quach Hao Thien  
MGNLUI-7577 Review docu Sub-task Completed Adrian Brooks  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 21
Story Points: 2
Team: Nucleus

 Description   

Steps to reproduce

  1.  Go to demo
  2.  Go to Site app, open Travel site definition and within the i18n folder, delete the locales node
  3.  Select the i18n node and import the config.modules.multisite.config.sites.fallback.i18n.locales.yaml file
  4.  Go to Pages-app, open a page and select another language (not English)
  5. Check that if the locale belongs to the first group (you didn't need to scroll on the locales dropdown), then if you open the language selector again the selected language is selected
  6. Now select a locale that is on other page (you need to scroll on the languages selector drop down)
  7. Open the dropdown menu again and check that English (the first displayed locale) is selected

Expected results

The selected locale is respected

Actual results

If the selected locale is not on the first group of locales, the first one (usually, English) is selected

Workaround

N/A

Development notes

Check the videos attached by the customer:

Under ten locales

More than ten locales



 Comments   
Comment by Roman Kovařík [ 29/Sep/22 ]

Do I get it right that this is just a visual problem (if you open and close the dropdown, the proper value seems to be still selected)?

Comment by Marvin Boie [ 29/Sep/22 ]

Hi Roman

If the selected language is on a different page than the first one, the first entry of the first page is selected (In the video it's English), and the select field forgets that another language should be select on a different page.

In my opinion, this is a functional problem.

Comment by Roman Kovařík [ 29/Sep/22 ]

Hey mboie

I was able to reproduce with plain Vaadin and reported it https://github.com/vaadin/framework/issues/12557.

 

Regards 

Roman

Comment by Roman Kovařík [ 29/Sep/22 ]

Discovery:

This is intended behaviour in vaadin8 as explained in the github issue.

The workaround suggested on github should work for us in case of the locale selector.

This behaviour is the same also for any configured comboBox in dialogs. The user is able to use `scrollToSelectedItem=true` to workaround this. We might want to document this.

 

Comment by Quach Hao Thien [ 14/Oct/22 ]

For RN:

  • LocaleSelector popup menu scrolls to selected item by default.

For Combobox field Docu:

  • Known issue:
    • When combobox opens select menu, which has more than one page, it always opens the first page by default. If selected item is located in the other pages than the first page, the selected item will be switched to the first item of the first page, but yet trigger value changed event unless user confirms the new value by clicking on it or hit Enter.
    • By setting `scrollToSelectedItem = true`, the problem above will be solved. But be aware: This requires finding the index of the item, which can be expensive in many large lazy loading containers.
Generated at Mon Feb 12 09:47:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.