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

MWPW-153586 - [LocUI] Validation and URL Actions state #2569

Merged
merged 8 commits into from
Jul 23, 2024

Conversation

Sartxi
Copy link
Contributor

@Sartxi Sartxi commented Jul 15, 2024

URL action buttons need better state management. This PR adds better action button state management and updates the validation of both configured URLs and URLs returned in find fragments to verify the page exists and is the same origin.

  1. URL actions will be disabled if the URL returns a 404 or is not from the same origin. The Edit and Live actions will also be disabled if theyre sources return a 404.
  2. LocUI will now display "not same domain" for URLs with origins that do not match the current project. Updating to show status in URLs, Errors toast, and in fragment scan results.
Screenshot 2024-07-15 at 2 55 10 PM Screenshot 2024-07-15 at 2 54 53 PM Screenshot 2024-07-15 at 2 55 29 PM

Resolves: MWPW-153586

Fragment Validation:
https://sean-loc--milo--adobecom.hlx.page/tools/loc?ref=main&repo=milo&owner=adobecom&host=milo.adobe.com&project=Milo&referrer=https%3A%2F%2Fadobe.sharepoint.com%2F%3Ax%3A%2Fr%2Fsites%2Fadobecom%2F_layouts%2F15%2FDoc.aspx%3Fsourcedoc%3D%257B183689e0-de1c-41a7-be6f-cc16e477b2fc%257D%26action%3Deditnew%26wdsle%3D0

URLs Validation:
https://sean-loc--milo--adobecom.hlx.page/tools/loc?ref=main&repo=milo&owner=adobecom&host=milo.adobe.com&project=Milo&referrer=https%3A%2F%2Fadobe.sharepoint.com%2F%3Ax%3A%2Fr%2Fsites%2Fadobecom%2F_layouts%2F15%2FDoc.aspx%3Fsourcedoc%3D%257B25CBF365-16EF-4190-B278-35614F0ACD35%257D%26file%3DUrls%2520404s%2520sync%25201.xlsx%26action%3Ddefault%26mobileredirect%3Dtrue%26wdsle%3D0

@Sartxi Sartxi requested a review from auniverseaway July 15, 2024 21:04
Copy link
Contributor

aem-code-sync bot commented Jul 15, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.68%. Comparing base (3a137ca) to head (0fbbee6).
Report is 773 commits behind head on locui.

Additional details and impacted files
@@            Coverage Diff             @@
##            locui    #2569      +/-   ##
==========================================
- Coverage   96.20%   95.68%   -0.53%     
==========================================
  Files         135      165      +30     
  Lines       33267    43538   +10271     
==========================================
+ Hits        32006    41661    +9655     
- Misses       1261     1877     +616     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aem-code-sync aem-code-sync bot temporarily deployed to sartxi/MWPW-153586-actions July 16, 2024 17:09 Inactive
@Sartxi Sartxi added the new-feature New block or other feature label Jul 17, 2024
@aem-code-sync aem-code-sync bot temporarily deployed to sartxi/MWPW-153586-actions July 17, 2024 17:30 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to sartxi/MWPW-153586-actions July 17, 2024 19:16 Inactive
@Sartxi Sartxi changed the title MWPW-153586 - [LocUI] Update validation to include origin check MWPW-153586 - [LocUI] Validation and URL Actions state Jul 18, 2024
@Sartxi Sartxi merged commit d23f7c3 into locui Jul 23, 2024
9 of 12 checks passed
@Sartxi Sartxi deleted the sartxi/MWPW-153586-actions branch July 23, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New block or other feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants