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

IBX-3681 - Added selectedLanguage update on location change in UDW #2065

Merged
merged 2 commits into from Aug 23, 2022

Conversation

mateuszbieniek
Copy link
Contributor

Question Answer
Tickets IBX-3681
Bug fix? yes
New feature? no
BC breaks? no

When a location is clicked inside UDW the languageSelected is set by

    const [selectedLanguage, setSelectedLanguage] = useState(preselectedLanguage || firstLanguageCode);

Unfortunately, useState only sets the value of the hook and won't update it with the next elements clicked, which can end up in a different Language used by Content on the Fly, when the default element in the Language Selected form is the one that user wants to use (so no onClick event).
The change introduced ensures that languageSelected const has a proper value set.

…ontent-create-widget/content.create.widget.js

Co-authored-by: Michał Grabowski <valygar92@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

@tomaszszopinski
Copy link
Contributor

After patch appliance original error is fixed, but 404 error appears when Article CT is opened (step 8 in Jira)

2065_1.mov

.

Copy link
Contributor

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

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

QA approved on IbexaDXP 3.3 commerce.

@mateuszbieniek
Copy link
Contributor Author

After patch appliance original error is fixed, but 404 error appears when Article CT is opened (step 8 in Jira)
2065_1.mov

.

Issue not related to the fix:
https://issues.ibexa.co/browse/IBX-3713
The fix only makes it easier to surface.

@mikadamczyk mikadamczyk merged commit 583a04a into ezsystems:2.3 Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants