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

Validate collection page URL #2291

Open
wants to merge 3 commits into
base: public-collections-feature
Choose a base branch
from

Conversation

SuaYoo
Copy link
Member

@SuaYoo SuaYoo commented Jan 9, 2025

Resolves #2286

Changes

  • Disables saving collection start page if valid snapshot is not selected
  • Shows full URL in page URL status check mark
  • Shows error in page URL status exclamation mark
  • Fixes pasting in URL

Manual testing

  1. Log in as crawler
  2. Go to collection with items
  3. Click "Configure Home"
  4. Choose "Start Page"
  5. Paste in full URL of a page that's in the collection. Verify snapshot is selected by default
  6. Hover over success checkmark. Verify full URL is shown
  7. Clear page URL input. Verify snapshot is also cleared
  8. Enter page URL that isn't in the collection
  9. Click outside of page URL input. Verify input is highlighted in danger color and "Save" button is disabled
  10. Hover over !. Verify error message is shown

Screenshots

Page Image/video
Collection detail - Initial state Screenshot 2025-01-08 at 5 09 15 PM
Collection detail - page exists Screenshot 2025-01-08 at 5 27 22 PM
Collection detail - page not found Screenshot 2025-01-08 at 5 26 04 PM

@SuaYoo SuaYoo changed the base branch from main to public-collections-feature January 9, 2025 02:13
@SuaYoo SuaYoo marked this pull request as ready for review January 9, 2025 02:15
<div slot="suffix" class="flex items-center">
<sl-tooltip hoist>
<sl-icon
name="exclamation-lg"
Copy link
Member Author

Choose a reason for hiding this comment

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

Could maybe also be a small 404 badge? Feel free to update if you have ideas @Shrinks99

Copy link
Member

@Shrinks99 Shrinks99 Jan 9, 2025

Choose a reason for hiding this comment

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

I like the exclamation point, but would rather not add additional icons to the right side of the input field where the clear button is (which is an actual intractable control). Could we show the error text below like we do for other form fields and maybe swap out the search icon on success / error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid URL in collection home dialogue does not result in an error state
2 participants