-
Notifications
You must be signed in to change notification settings - Fork 16
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 prefix to tags in addition to suffix #706
Conversation
Hi @kitallis, the PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've approved it with a request for a simple JS change. Once that's done I'll merge this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I think we can make this controller generic at this point, instead of a domain controller. Something like a StringAffixController
(affiix representing both prefix and suffix). This will take the base string and prefix and suffix and the specified separator.
@@ -5,18 +5,22 @@ | |||
hide_child: @train.tag_releases?) do |component| %> | |||
<% component.with_child do %> | |||
<section data-controller="help-text"> | |||
<div data-controller="domain--release-suffix-help" | |||
data-domain--release-suffix-help-version-value="<%= @train.version_current || @train.version_seeded_with || "1.0.0" %>" | |||
data-domain--release-suffix-help-version-suffix-current-value="<%= @train.tag_suffix %>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kitallis, |
What does this PR achieve?
tag_prefix
column totrains
tablerelease_suffix_help_controller.js
to a generic controllerstring_affix_controller.js
baseString
,prefix
,suffix
and the specifiedseparator
.data-string-affix-prefix-current-value
anddata-string-affix-suffix-current-value
attributes as they are not needed for thestring-affix
controller to function correctly.Demo
https://www.loom.com/share/74aefe260f3a412597c99ae00b560ce0