-
Notifications
You must be signed in to change notification settings - Fork 913
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
Remove jQuery dependency (#6504) #6575
Conversation
bd357f7
to
563da92
Compare
563da92
to
003feb0
Compare
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.
Just a few fixups and I think we may need to dial back the use of dataset
sadly, but otherwise looking great 👍
9f32995
to
5cbf078
Compare
5cbf078
to
ccc0f7f
Compare
Updated. |
This needs a rebase now that the footer PR merged. |
ccc0f7f
to
31ed06a
Compare
Updated. |
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.
Still one place using dataset
, but otherwise lgtm 👍
Updated. |
Utils.trans = function(stringId) { | ||
return _$strings.data(stringId); | ||
if (_strings) { | ||
return _strings.getAttribute('data-' + stringId); |
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.
Hmm, this isn't quite going to work as-is.
Whilst some calls to this function use dashes to separate attribute names, other calls use camelCase, which for the jQuery API (and native dataset) is totally fine, but would break here as we're assuming dashes only.
Either this function should handle both cases (more complex), or we should choose one method over the other, and update all calls to use the same syntax. Thoughts?
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.
Good catch. 🎣
In a perfect world we handle both cases but in the name of expediency I'm tempted to just go with dashes and update the code base.
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.
OTOH there is a certain irony to talking about expediency in a 3 month old 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.
Dash is way more common, converting to dashes.
Description
Issue / Bugzilla link
#6504
Testing