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 a view component for tagging, replacing bootstrap-tagsinput #3078

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

taylor-steve
Copy link
Contributor

@taylor-steve taylor-steve commented Aug 6, 2024

Closes #2890
Closes #2962

A variation on the code mentioned in #3074, adding the ability to add new tags on the fly in the same fashion as bootstrap-tagsinput.

This would be the last use of bootstrap-tagsinput and twitter typeahead (typeahead.bundle) in Spotlight.

@taylor-steve taylor-steve force-pushed the stimulus-tags branch 2 times, most recently from 6ee6e2c to f58de16 Compare August 31, 2024 00:02
@taylor-steve taylor-steve changed the title [WIP] Add a view component for tagging Add a view component for tagging, replacing bootstrap-tagsinput Aug 31, 2024
@taylor-steve taylor-steve marked this pull request as ready for review August 31, 2024 17:23
@taylor-steve
Copy link
Contributor Author

taylor-steve commented Sep 13, 2024

Looking for feedback on if my changes (the ability to add a new tag on the fly) to the original, good widget that I adapted ruin it. Sometimes I think it makes it a bit unwieldly, but it is functional.

If people think this is okay to use in this way, Alan wanted a demo or a push to stage for final say.

Copy link
Contributor

@corylown corylown left a comment

Choose a reason for hiding this comment

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

This seems like an okay solution to me if Alan approves of the UI. The UI is...unusual...but in some ways it's clearer than the current implementation. See comment about checking for BS4

private

def bootstrap_version
bootstrap_gem = Gem.loaded_specs['bootstrap']
Copy link
Contributor

Choose a reason for hiding this comment

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

In other places in Spotlight we've added the visually-hidden class to the close button so it will appear for BS4 and not BS5. Would that be possible here too so we don't have to check the version of the installed gem?

<span aria-hidden="true" class="visually-hidden">&times;</span>

@jcoyne
Copy link
Member

jcoyne commented Sep 16, 2024

Would it be better to use the tag UI that @dnoneill developed for Argo?

@taylor-steve taylor-steve force-pushed the stimulus-tags branch 4 times, most recently from 84cb969 to a621fe1 Compare December 6, 2024 15:27
@taylor-steve taylor-steve force-pushed the stimulus-tags branch 2 times, most recently from d11bfec to d63bccb Compare December 19, 2024 00:49
@corylown corylown merged commit 7c80640 into main Dec 20, 2024
5 checks passed
@corylown corylown deleted the stimulus-tags branch December 20, 2024 21:50
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.

Replace dependency on twitter-typeahead rails replace bootstrap-tagsinput dependency
3 participants