-
Notifications
You must be signed in to change notification settings - Fork 160
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
Region selector #556
Region selector #556
Conversation
Hello, I'm Franklin Bot and I will run some test suites that validate the page speed.
|
Codecov Report
@@ Coverage Diff @@
## main #556 +/- ##
=======================================
Coverage 95.84% 95.84%
=======================================
Files 94 94
Lines 25092 25092
=======================================
Hits 24050 24050
Misses 1042 1042 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
|
item.append(previewLink); | ||
item.append(editLink); | ||
li.append(item); | ||
ol.append(li); |
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.
Nicer if results are alphabetized.
Using something like:
const insertAlphabetically = (ol, li) => {
const locale = li.getAttribute('data-locale');
const items = [...ol.getElementsByTagName('li')];
const insertBefore = items.find((item) => locale < item.getAttribute('data-locale'));
if (insertBefore) {
ol.insertBefore(li, insertBefore);
} else {
ol.append(li);
}
};
ol.append(li); | |
insertAlphabetically(ol, li); |
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.
Thanks for the tip. Applied!
Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com>
|
|
|
|
|
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.
Looks good. Need to get Chris' PR merged into this.
There are a few code checks that are failing related to referrers
|
|
|
|
|
* Adding tool button. * WIP * wip * for testing. * For testing * Fixing few stuff after testing. * Adjust palette size, change div to ol * Sort the locale array alphabetically. * nit: little refactoring. * UI/UX update. * remove white bg * Added guide line for each item * Fail condition added. * Update libs/blocks/region-selector-loader/region-selector-loader.js Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com> * Print result alphabetically. * nit: update getAttribute('data-locale') to dataset.locale * Color code added for un-previewed webPath. * Updated style as Rikkio and Ryan agreed. * Taking off the test code. * UI/UX update and enabling it on pages as well. * Renaming the block * Taking off the test urls * Added search. * Matching the search bar size as icons. * Fixed the set logic. * Polish (adobecom#575) * Fix security issue * Fix security issue --------- Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com> Co-authored-by: Chris Millar <cmillar@adobe.com>
Resolves: MWPW-127468
Test URLs:
Word Referrer (edit mode)
Page Referrer (view mode)