Remove inline tooltips from inspector codebase
Categories
(DevTools :: Inspector, task, P3)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: jdescottes, Assigned: manuelalejandrosac, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
We had a project to redesign inspector tooltips as Inline Tooltips:
https://searchfox.org/mozilla-central/source/devtools/client/shared/widgets/tooltip/InlineTooltip.js
But this project has been stopped and will not be finished. We should remove everything related to those tooltips from the codebase.
1/ The InlineToolip.js file should be removed.
2/ The reference to this file in the corresponding moz.build file should also be removed: https://searchfox.org/mozilla-central/rev/f27594d62e7f1d57626889255ce6a3071d67209f/devtools/client/shared/widgets/tooltip/moz.build#13
3/ On top of the file itself, there is also the useInline
property in SwatchBasedEditorTooltip.js: https://searchfox.org/mozilla-central/search?q=useInline&path=SwatchBasedEditorTooltip.js . We should remove this property.
4/ There are also 2 references in the codebase to an inline-tooltip-container class. One of those will go away as part of this cleanup, but since there are no styles/behaviors associated with it, we should also remove it from text-property-editor.js.
Setting as good first bug. The summary should have all the info & steps.
Comment 1•4 years ago
|
||
I am also linking the original bug here to help people understand the original code changes. https://bugzilla.mozilla.org/show_bug.cgi?id=1307481
Comment 2•4 years ago
|
||
Hey can i work on this? If yes, then can u guide me as to how can i access the code, and remove these files.
Reporter | ||
Comment 3•4 years ago
•
|
||
Hi!
Sure I'll assign the bug to you.
You should find all the information you need to get started on https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
There is also a documentation more focused around DevTools at https://firefox-source-docs.mozilla.org/devtools/getting-started/README.html, but in theory the first one should be enough.
If you have any issue setting up your dev environment, the best is to ask for help on https://chat.mozilla.org/#/room/#devtools:mozilla.org
If you have more general questions you wish to ask on the bug, make sure to use the "Request information from" checkbox below the comment box, so that we are notified.
Thanks!
Comment 4•4 years ago
|
||
okay, i will get started!
Comment 5•4 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Hey Julian,
What's the status of this bug?
Can I work on this if possible?
Comment 7•4 years ago
|
||
I would also like to work on this if its availaible
Hi, I am new to open source and want to start. If it is still open I am ready to contribute.
Comment 9•4 years ago
|
||
Hi Julian,would like to work on this issue,if its available.
Comment 10•3 years ago
|
||
Hello sir,
I succesfully build this mozilla. Can I work on this issue?
Thanks
Comment 11•3 years ago
|
||
Please response me.
Comment 12•3 years ago
|
||
Vishal, you are now assigned to three other bugs: https://mzl.la/2OurUYm
Please fix those and then ask for more.
Thank you for helping!
Honza
Comment 13•3 years ago
|
||
Hello jdescottes.
I just want to ask a simple question. In this issue. Do I only have to erase and remove files nothing else?
Request Information from :jdescottes.
Reporter | ||
Comment 14•3 years ago
|
||
Hi Vishal, to request information, please use the "Request information from" UI below the comment box.
Typing Request Information from
will not create a notification, and we might miss your question :)
The summary is quite complete: https://bugzilla.mozilla.org/show_bug.cgi?id=1667943#c0 and details everything you have to do. Please read it carefully, removing the file is only part of the task.
Also as Honza mentioned, it would be good to try to resolve the bugs you are already assigned to before jumping on this.
Thanks!
Assignee | ||
Comment 15•3 years ago
|
||
Hello, I was wondering if I could work on this bug?
Reporter | ||
Comment 16•3 years ago
|
||
(In reply to Manuel Carretero from comment #15)
Hello, I was wondering if I could work on this bug?
Sure Manuel, assigning it to you.
Take a look at the summary https://bugzilla.mozilla.org/show_bug.cgi?id=1667943#c0 hopefully this should still be up to date.
If you need to setup your development environment, our docs are at https://firefox-source-docs.mozilla.org/setup/index.html
If you need help, either ask here (make sure to use the "Request information from" UI below the comment box, to make sure we get a clear notification), or you can use https://chat.mozilla.org/#/room/#devtools:mozilla.org
Thanks!
Assignee | ||
Comment 17•3 years ago
|
||
Thanks Julian!, will start working on it later this evening
Assignee | ||
Comment 18•3 years ago
|
||
I have a problem understanding something, On line 155 one of the arguments taken from the createChild() function is an object that has has a key called "class" with the value "ruleview-propertycontainer inline-tooltip-container", should I remove the object entirely? Wouldn't the createChild function stop working if I remove one of its parameters? From how the funtion createChild() is declared I don't understand what parameters it takes and how should I edit it
Assignee | ||
Comment 19•3 years ago
|
||
Whoops forgot to mention I'm talking about the text-property-editor.js file
Reporter | ||
Comment 20•3 years ago
|
||
(In reply to Manuel Carretero from comment #18)
I have a problem understanding something, On line 155 one of the arguments taken from the createChild() function is an object that has has a key called "class" with the value "ruleview-propertycontainer inline-tooltip-container", should I remove the object entirely? Wouldn't the createChild function stop working if I remove one of its parameters? From how the funtion createChild() is declared I don't understand what parameters it takes and how should I edit it
Hi Manuel,
Short version: we will keep the argument, but remove the " inline-tooltip-container" in the string (ie{ class: "ruleview-propertycontainer" }
).
Long version: createChild is defined at https://searchfox.org/mozilla-central/rev/3ae6f9e4444f3fbf61034317540d36f621117600/devtools/client/inspector/shared/utils.js#108
function createChild(parent, tagName, attributes = {}) {
const elt = parent.ownerDocument.createElementNS(HTML_NS, tagName);
for (const attr in attributes) {
if (attributes.hasOwnProperty(attr)) {
// ... simplified ...
elt.setAttribute(attr, attributes[attr]);
}
}
// ...
}
And it's called as:
this.container = createChild(this.element, "div", {
class: "ruleview-propertycontainer inline-tooltip-container",
});
Our { class }
object is the 3rd argument attributes
. createChild
loops on all the keys in attributes
(via const attr in attributes
) and will usually set them on the newly created element using elt.setAttribute(attr, attributes[attr]);
. So for class
, we will end up doing elt.setAttribute("class", "ruleview-propertycontainer inline-tooltip-container");
, which will create 2 classNames on the element.
We still want to set the className ruleview-propertycontainer
, but we don't need inline-tooltip-container
anymore. Because it was only used from devtools/client/shared/widgets/tooltip/SwatchBasedEditorTooltip.js to find the container.
Assignee | ||
Comment 21•3 years ago
|
||
Thanks for the detailed answer Julian, I'm looking to get my code reviewed when it's suitable for you
Reporter | ||
Comment 22•3 years ago
|
||
Thanks Manuel, try to post your patch to phabricator I'll get a ping from the review tool automatically :)
I see from https://chat.mozilla.org you had a few issues submitting the patch, apparently because you have uncommitted changes in your repository. As suggested by others in chat, make sure to either:
- fold the uncommitted changes in your current commit with
hg commit --amend
- or discard the uncommitted changes for now with
hg shelve
You can review the uncommitted changes using hg diff
.
Assignee | ||
Comment 23•3 years ago
|
||
Comment 24•3 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d9835f0eb743 Removed inline tooltips references. r=jdescottes
Comment 25•3 years ago
|
||
bugherder |
Description
•