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

feat: add remove option field to playground #445

Merged
merged 3 commits into from
May 24, 2024

Conversation

screensaversclub
Copy link
Contributor

  • Create new RegExp from user input
  • "global" and "ignore case" flags are exposed as checkboxes to user
  • Tested with simple regex like /[aeiou]/gi (remove vowels) or /(?<= )((a)|(an)|(the))(?= )/gi (remove a/an/the with both positive and negative lookahead for space character)

@Trott
Copy link
Owner

Trott commented May 11, 2024

Totally optional suggestion that you can feel free to ignore (or save for another PR), but the remove option is sort of an advanced option that very few (no?) users actually need, and that gets misunderstood/misused a lot, so it might not be a terrible idea to hide it in an element that needs to be expanded, maybe with something like this?:

<details>
<summary>Advanced options</summary>
Remove: <input type="text">
</details>

@screensaversclub
Copy link
Contributor Author

Happy to do so as I think you have a better idea how people tend to use the package. I'll push a commit with that.

Do you think the charmap and multicharmap options would be folded into this advanced disclosure as well?

@Trott
Copy link
Owner

Trott commented May 12, 2024

Do you think the charmap and multicharmap options would be folded into this advanced disclosure as well?

I'd leave those out entirely. I can't even imagine a reliable way to implement them that isn't a UX nightmare.

@screensaversclub
Copy link
Contributor Author

@Trott circling back to this, do you think there's anything else you'd like to rethink about this PR here? (Not sure if it's pending my action. ) Thanks!

@Trott
Copy link
Owner

Trott commented May 24, 2024

@screensaversclub Thanks for your patience. This looks good and I'll land it now.

@Trott Trott merged commit 8888d69 into Trott:main May 24, 2024
7 checks passed
github-actions bot pushed a commit that referenced this pull request May 24, 2024
# [9.1.0](v9.0.0...v9.1.0) (2024-05-24)

### Features

* add `remove` option field to playground ([#445](#445)) ([8888d69](8888d69))
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