Remove aliased property names from themes
Categories
(WebExtensions :: Themes, task, P1)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: aswan, Assigned: rpl)
References
Details
(Keywords: dev-doc-complete)
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1472740 - Remove support for deprecated lwt aliases from WebExtensions theme API. r?ntim!,robwu!
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Reporter | ||
Comment 5•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
Comment 15•6 years ago
|
||
Please reconsider NOT to deprecate "toolbar_text".
"bookmark_text" is not suitable wording for the text color of the toolbar.
"toolbar_text" is much more semantic.
Comment 16•6 years ago
|
||
(In reply to Kazumasa Hasegawa (Kazz) from comment #15)
Please reconsider NOT to deprecate "toolbar_text".
"bookmark_text" is not suitable wording for the text color of the toolbar.
"toolbar_text" is much more semantic.
Agreed. The color is used outside of the bookmarks toolbar, so bookmark_text would be misleading. It's fine to support bookmark_text as an alias to be compatible with Chrome themes, but compatibility doesn't need to go both ways as we aim to make Firefox more extensible than Chrome.
The same goes for textcolor / tab_background_text. tab_background_text is fine as an alias for compatibility, but in reality that color is used more broadly than just for background tabs.
Comment 17•6 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #16)
(In reply to Kazumasa Hasegawa (Kazz) from comment #15)
Please reconsider NOT to deprecate "toolbar_text".
"bookmark_text" is not suitable wording for the text color of the toolbar.
"toolbar_text" is much more semantic.Agreed. The color is used outside of the bookmarks toolbar, so bookmark_text would be misleading. It's fine to support bookmark_text as an alias to be compatible with Chrome themes, but compatibility doesn't need to go both ways as we aim to make Firefox more extensible than Chrome.
The same goes for textcolor / tab_background_text. tab_background_text is fine as an alias for compatibility, but in reality that color is used more broadly than just for background tabs.
The argument makes sense to me, but on the other hand, aliases make it harder for theme validation, which is why this change was decided. I don’t have a strong opinion tbh, but maybe we can figure out a solution that let’s us have descriptive names and compatibility with chrome without making it a pain to validate.
Assignee | ||
Comment 18•5 years ago
|
||
Based on comment 10, we should proceed on ripping off the deprecated aliases in Firefox 69, and so pretty soon.
We leaved this issue open to attach and then land the patch that will remove the deprecated aliases from the API schemas (which will then turn any usage of those aliases into errors raised by the linter on new addon submission, once the addons-linter will have imported the updated 69beta schemas).
Are we ready to proceed to the "API schema LWT aliases rip off"?
e.g. have we reached an agreement about what to do about toolbar_text
? (if it has to stay or if it can go away with the other ones)
Would you mind to proceed on creating the new patch?
(if no one can work on the new patch, I'm also willing to prepare and attach a new patch to this issue, but I would still need your help to decide what we want to do about toolbar_text
).
Assignee | ||
Comment 19•5 years ago
|
||
Hey Andrew,
we planned to completely remove support for the LWT theme aliases from the API schemas in Firefox 69,
and so I was wondering: is there any of the "AMO converted LWT themes" still using the deprecated aliases?
Comment 20•5 years ago
•
|
||
(In reply to Tim Nguyen :ntim from comment #17)
The argument makes sense to me, but on the other hand, aliases make it harder for theme validation, which is why this change was decided. I don’t have a strong opinion tbh, but maybe we can figure out a solution that let’s us have descriptive names and compatibility with chrome without making it a pain to validate.
It's not clear to me why aliases make theme validation much harder. Generally it doesn't seem unreasonable for a validator to handle such things. What in particular is the problem here?
(In reply to Luca Greco [:rpl] from comment #18)
Are we ready to proceed to the "API schema LWT aliases rip off"?
e.g. have we reached an agreement about what to do abouttoolbar_text
?
No, we have not. Speaking from the Firefox theme perspective, I can't promise how will implement these things if the Chrome aliases become the primary and only names. We could either limit where they apply to reflect their names, which would likely break themes, or we could misuse them beyond their intended context, which would confuse theme authors targeting Firefox going forward. Either way seems problematic.
Comment 21•5 years ago
|
||
we planned to completely remove support for the LWT theme aliases from the API schemas in Firefox 69,
and so I was wondering: is there any of the "AMO converted LWT themes" still using the deprecated aliases?
No, we repacked all the themes listed on AMO , (changed the manifest in the .xpi and as saved it as a new version). Both the ones we migrated from LWT, and user uploads since then. There will be some versions created as unlisted and privately distributed out there but that's beyond our control.
Assignee | ||
Comment 22•5 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #20)
(In reply to Tim Nguyen :ntim from comment #17)
The argument makes sense to me, but on the other hand, aliases make it harder for theme validation, which is why this change was decided. I don’t have a strong opinion tbh, but maybe we can figure out a solution that let’s us have descriptive names and compatibility with chrome without making it a pain to validate.
It's not clear to me why aliases make theme validation much harder. Generally it doesn't seem unreasonable for a validator to handle such things. What in particular is the problem here?
I think that the main issue is that the API schema for the theme manifest properties is not currently providing any information about which are the aliases and what to do when both the aliased and aliases properties are specified in the manifest at the same time (and both Firefox and the addons-linter use the API schemas to validate the manifest and the parameters supported by the API methods).
(In reply to Luca Greco [:rpl] from comment #18)
Are we ready to proceed to the "API schema LWT aliases rip off"?
e.g. have we reached an agreement about what to do abouttoolbar_text
?No, we have not. Speaking from the Firefox theme perspective, I can't promise how will implement these things if the Chrome aliases become the primary and only names. We could either limit where they apply to reflect their names, which would likely break themes, or we could misuse them beyond their intended context, which would confuse theme authors targeting Firefox going forward. Either way seems problematic.
Personally I don't disagree, as I mentioned in comment 12 I think that "toolbar_text"
is a more consistent name (considering the other "toolbar_*"
theme color properties we support), and so I would personally consider it more like a default value (to be used for all toolbar text, including the bookmarks if there is no "bookmark_text"
that overrides it specifically for the bookmarks) instead of considering the "bookmark_text" and "toolbar_text" as aliases for each other.
Comment 23•5 years ago
|
||
(In reply to Luca Greco [:rpl] [:luca] from comment #18)
Based on comment 10, we should proceed on ripping off the deprecated aliases in Firefox 69, and so pretty soon.
We leaved this issue open to attach and then land the patch that will remove the deprecated aliases from the API schemas (which will then turn any usage of those aliases into errors raised by the linter on new addon submission, once the addons-linter will have imported the updated 69beta schemas).
Are we ready to proceed to the "API schema LWT aliases rip off"?
e.g. have we reached an agreement about what to do abouttoolbar_text
? (if it has to stay or if it can go away with the other ones)
There doesn't seem to be an agreement AFAIK.
Would you mind to proceed on creating the new patch?
(if no one can work on the new patch, I'm also willing to prepare and attach a new patch to this issue, but I would still need your help to decide what we want to do abouttoolbar_text
).
Sorry, I don't have time to look into this right now.
Updated•5 years ago
|
Comment 24•5 years ago
|
||
Reading this issue, it seems Mike has already made a product decision and the arguments that have come after that did not add much counter points aside from consistency with other toolbar_
properties. I think we all agree that toolbar_text
makes more sense and that the decision was mainly for compatibility reasons.
That said maybe it makes sense to revisit the premise on how much more difficult it is to make use of aliases. To recap from comment 0 and comment 3:
- The schema is not capable of mutually exclusive properties or required aliases
- The schema needs to be kept in sync in AMO and the browser
- Documentation is slightly more difficult
theme.getCurrent()
returns whatever the author specified, making aliases more difficult
It seems that we are making the decision to remove aliases mainly on technical merits, so let's try to see the developer and product perspective:
- Aliases allow us to make the names easier to understand and more appropriate for the UI they are changing
- At the same time, having aliases that are mutually exclusive if they don't have the same value is challenging for the product and the developer
- We have other
toolbar_
properties, so consistency in that regard is favorable - Supporting the Chrome names is essential for compatibility
Altogether, I feel that despite the potential downsides we'd be providing a better experience for developers if we allow the use of aliases, as long as we have a sufficient number of safeguards against mutually exclusive values. This would require improvements to the schema validation and linter though and I'd like to understand how difficult this really is.
My suggested changes:
- Retain the
toolbar_text
alias tobookmark_text
- Fix the validation to detect aliases correctly
- Make
theme.getCurrent()
return both proper and aliased values, despite what the author specified - Provide some sort of automation or documentation that keeps us from having the schemas run out of sync
Assignee | ||
Comment 25•5 years ago
|
||
Assignee | ||
Comment 26•5 years ago
|
||
Depends on D37889
Assignee | ||
Comment 27•5 years ago
|
||
Depends on D37890
Assignee | ||
Comment 28•5 years ago
|
||
Raising priority to P1 (especially given that this was something that should have been done in 69).
Assignee | ||
Comment 29•5 years ago
|
||
Assignee | ||
Comment 30•5 years ago
|
||
Depends on D38300
Assignee | ||
Comment 31•5 years ago
|
||
Added the addons-linter pull request to the issue "See Also" field.
Comment 32•5 years ago
|
||
Comment 33•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 34•5 years ago
|
||
BCD needs to be updated:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme#Colors
- accentcolor should be marked as unsupported since 70, referring to "frame" instead.
- textcolor should be marked as unsupported since 70, referring to "tab_background_text" instead.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme#Imag
- headerURL should be marked as unsupported since 70, referring to "theme_frame" instead.
- A new row needs to be added, called "theme_frame".
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme#images
- The
theme_frame
section contains "Alias for headerURL, provided for Chrome compatibility.".
Starting from Firefox 70, this is the only supported property. The theme_frame and headerURL rows needs to be merged in a meaningful way.
- The section misleadingly suggests that
headerURL
,accentcolor
andtextcolor
are supported and recommended aliases of the theme properties in Chrome. The only valid property in the table is "toolbar_text". I suggest to remove the table, and put the version-specific notes in the BCD or other sections in the MDN page.
Assignee | ||
Comment 35•5 years ago
|
||
The theme's browser-compat-data should also be updated:
Comment 36•5 years ago
|
||
(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #35)
The theme's browser-compat-data should also be updated:
I will start on it later today.
Comment 37•5 years ago
|
||
Tracked in MDN/Sprints #2061
Comment 38•5 years ago
|
||
Hello,
Will this fix require manual validation? If yes, please provide some steps to reproduce in order to correctly test it and also, please set the "qe-verify+" flag. Otherwise, could the "qe-verify-" flag be added? Thanks!
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 39•5 years ago
|
||
Docs work has been done; see https://github.com/mdn/sprints/issues/2142 for a description of exactly what we did. Please can I have a review?
Description
•