[PAGES-268] Upon locale switch in dialog, the page editor state resets selection to page, causing data to be written there Created: 16/Mar/20 Updated: 18/Oct/21 Resolved: 23/Mar/20 |
|
| Status: | Closed |
| Project: | Magnolia pages module |
| Component/s: | None |
| Affects Version/s: | 6.2 |
| Fix Version/s: | 6.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Aleksandr Pchelintcev | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0.25d | ||
| Time Spent: | 3.05h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Sprint: | UI Framework 20 | ||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||
| Description |
|
Prepare: Prepare one dialog component as below:
form:
properties:
testfield:
label: testfield
$type: textField
i18n: true
or you can use hello-template that attached to this ticket hello-magnolia.zip Step to reproduce:
Expect: component must be store correctly.
|
| Comments |
| Comment by Roman Kovařík [ 17/Mar/20 ] |
|
Could we remove
localeContext.current().observe(locale -> locale
.ifPresent(l -> {
pageEditorStatus.setI18nKeys(Arrays.stream(AREAS_I18N_KEYS).collect(Collectors.toMap(Function.identity(), i18n::translate)));
pageEditorStatus.setLocale(l);
if (view.asVaadinComponent().isAttached()) {
loadPageEditor();
}
}));
and do the language update here?
observation = datasourceObservation.register(() -> {
updateParameters();
view.refresh();
});
|