-
Notifications
You must be signed in to change notification settings - Fork 45
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
FORMS-13851 Support for language in date picker and number input #1169
Conversation
Lighthouse scores (mobile)
|
Lighthouse scores (desktop)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1169 +/- ##
============================================
+ Coverage 80.75% 80.81% +0.05%
- Complexity 773 782 +9
============================================
Files 91 91
Lines 2110 2116 +6
Branches 285 286 +1
============================================
+ Hits 1704 1710 +6
Misses 252 252
Partials 154 154 ☔ View full report in Codecov by Sentry. |
Lighthouse scores (desktop)
|
Lighthouse scores (mobile)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
ContentPolicy policy = ComponentUtils.getPolicy((String) request.getAttribute(Value.CONTENTPATH_ATTRIBUTE), | ||
resourceResolver); | ||
resources.add(getResourceForDropdownDisplay(resourceResolver, "Select", "")); | ||
if (policy != null) { | ||
ValueMap props = policy.getProperties(); | ||
if (props != null) { | ||
for (Map.Entry<String, Object> entry : props.entrySet()) { | ||
if (entry.getKey().startsWith(ALLOWED_FORMAT)) { | ||
if ((type.equals(FormMetaDataType.FORMATTERS) && entry.getKey().startsWith(ALLOWED_FORMAT)) || | ||
(type.equals(FormMetaDataType.LANG) && entry.getKey().startsWith(FormMetaDataType.LANG.getValue()))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest making private functions and using that here for readability, something like below
if (isFormattersPolicy(type, entry) || isLangPolicy(type, entry))
bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/AbstractBaseImpl.java
Show resolved
Hide resolved
@@ -17,6 +17,8 @@ | |||
"enabled": false, | |||
"readOnly": true, | |||
"required": false, | |||
"lang" : "it-IT", | |||
"langDisplayValue" : "it-IT", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is langDisplayValue ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is internal JCR structure of lang, since we have a drop down which does listing of all the OOTB lang and there is another text box which stores the value, hence there are two properties
cy.get(`#${numberInput6}`).find("input").clear().type(input).blur().then(x => { | ||
expect(Number(model.getState().value)).to.equal(Number(input)); | ||
// Assert that the input value contains "121" and "212,000" regardless of the space type | ||
cy.get(`#${numberInput6}`).find('input').invoke('val').should('match', /121.*212,000/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value should be 121.121,00
why are we using regex to match it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some space in the display pattern, hence a regex is required to match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally space should not come. With space the the correct regex should be 121\.\s*121,000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it.
2a5d1a3
to
ff2d6f3
Compare
Lighthouse scores (desktop)
|
Lighthouse scores (mobile)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
Merging since this is reviewed by @vdua |
Lighthouse scores (mobile)
|
Lighthouse scores (desktop)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * Update space character for thousands separator in french lang * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) --------- Co-authored-by: Varun Dua <vdua@adobe.com>
* FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) * Update space character for thousands separator in french lang * FORMS-13851 Support for language in date picker and number input @review @vdua DOD(Yes) --------- Co-authored-by: Varun Dua <vdua@adobe.com>
@review @vdua
DOD(Yes)
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: