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

add url pattern validation and additional buttons #84

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

steven-klein
Copy link
Collaborator

@steven-klein steven-klein commented Nov 15, 2024

What this does

  • adds button styles for dark/marketing like UI support [DEV-3086]
  • adds basic url pattern validation to <BaseInput type="url" /> [DEV-2930]
  • bumps vue-tsc@latest
Screenshot 2024-11-15 at 10 52 29 AM Screenshot 2024-11-15 at 10 52 35 AM

*
* NOTE(spk): not all JavaScript regular expression characters are not supported in input patterns.
*/
export const urlPattern = String.raw`^(?:https|http):\/\/[^ ]+$`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I kept this on the conservative side, since a lack of a protocol or protocol mangling are the most common issues. This does tightly scope our <BaseInput type="url" /> to Website URL's, but that appears to be our only use case, and I can't remember the last time I needed to support another protocol.

However, you can always reach for type="text" with a custom pattern. ex: <BaseInput type="text" pattern="^(?:sftp|ftp):\/\/[^ ]+$" />

<!-- disabled -->
<button class="xy-btn-alt-sm" disabled>Button Text</button>
<button class="xy-btn-alt" disabled>Button Text</button>
<button class="xy-btn-alt-lg" disabled>Button Text</button>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We're close to 100% parity on button styles with marketing at this point, so I don't expect much more to show up here until an emerald/sapphire rebrand bomb drops.

Copy link
Collaborator

@DavidLarsKetch DavidLarsKetch left a comment

Choose a reason for hiding this comment

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

Looks sane to me!

@steven-klein steven-klein merged commit 60deda5 into main Nov 15, 2024
1 check passed
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.

2 participants