Closed Bug 1106437 Opened 6 years ago Closed 5 years ago

Suggestion for a better wording for "Copy Unique Selector" (including the word CSS in it)

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1211613

People

(Reporter: rick3162, Assigned: agore1)

References

Details

From https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector#Element_popup_menu_2:
> "Copy Unique Selector" copies a CSS selector that uniquely selects the element.
i.e this menu option has to do with CSS, 
yet it's name doesn't contain the word CSS in it.

So I suggest changing it into "Copy Unique CSS Selector" 
or even better as the shorter "Copy CSS path" that Google Chrome has.
Helen: What do you think about the suggestion above?
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hholmes)
Priority: -- → P3
Let's go with "Copy CSS Selector". Technically it's not selecting the "path" per se (which I assume would be a sort of Xpath, body > div > .coolthing > #cool-other-thing type deal).
Flags: needinfo?(hholmes)
Hello,

I want to work on this bug. Can you please assign this bug to me.
Thank you
Assignee: nobody → agore1
Status: NEW → ASSIGNED
Thanks for picking this up! 

You can have a look at https://developer.mozilla.org/en-US/docs/Tools/Contributing to setup your development environment.

If you need help with anything, you can ping us on the #devtools channel on IRC.

Here you will update an existing localized string, so you should have a look at the following page : https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Changing_existing_strings
OS: Windows 8.1 → All
Hardware: x86_64 → All
Version: 33 Branch → Trunk
I have solved this bug. Please Check and let me know if I made any mistake. If not the please close  this bug.

Thank you
(In reply to agore1 from comment #5)
> I have solved this bug. Please Check and let me know if I made any mistake.
> If not the please close  this bug.
> 
> Thank you

To make sure someone looks at your updates, use the "Need more information from" input below. For instance you can find me by typing ":jdescottes".

You first need to attach a patch to this bug and ask for a review so that we can see your changes. Check https://developer.mozilla.org/en-US/docs/Tools/Contributing#Fixing_a_bug .

Did you get a copy of the repository using Mercurial or Git? In any case you need export your changes to a file that you will attach here to ask for feedback or review. If you have trouble exporting your patch to a file, please ask on IRC either in #introduction or in #devtools.
@jdescottes : Hi julian,

I created the user account on MDN and edited the page as per the above instruction with the "edit" option given on the page and the I published it.
 
https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_HTML

The changes I made got reflected on the link.

I am installing Mercurial and setting up environment for that. Can you please review my work and guide me whether I did i correctly or not..?

Thank you
Flags: needinfo?(jdescottes)
Before updating the documentation on MDN, we first need to update the string in Firefox itself so that when you right click on an element in the Firefox Devtools Inspector, the menu entry reads "Copy CSS selector" instead of "Copy Unique Selector".

To do this you need to:
- follow the guide at https://developer.mozilla.org/en-US/docs/Tools/Contributing#Getting_set_up
- in devtools/client/locales/en-US/inspector.dtd change "Copy Unique Selector" to "Copy CSS Selector"
- as explained in https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Changing_existing_strings , you also need to change the key so that the new string can picked up by localization teams. This means changing inspectorCopyUniqueSelector in devtools/client/locales/en-US/inspector.dtd to a new name
- find all other occurrences of inspectorCopyUniqueSelector and replace them with the new name you picked in the previous step

Once you have proposed a patch, we will review it and commit it in Firefox. Then we can update the documentation on MDN :) (for now I reverted your changes on the MDN page).
Flags: needinfo?(jdescottes)
Hi Julian,

I fixed this bug and created the pull request on Github. Please go through it and let me know if something is wrong.

Thank you
(In reply to agore1 from comment #9)
> Hi Julian,
> 
> I fixed this bug and created the pull request on Github. Please go through
> it and let me know if something is wrong.
> 
> Thank you

Argh I replied to your email before seeing this. I will just paste my reply here.

No PRs on Github 
=================
Thanks for submitting a PR. However we do not accept PRs on Github. We work exclusively through Bugzilla.
Please close it if you have the chance, otherwise a bot/repo owner will probably do it in the coming days.

Please check again the documentation links we sent you : to submit a bug fix, you have to submit a patch as an attachment in Bugzilla.
You can follow the documentation on https://developer.mozilla.org/en-US/docs/Tools/Contributing#Fixing_a_bug to see how to export a patch and add it as an attachment on Bugzilla.

Commit review
=============
Regarding the patch itself, I had a quick look and this looks like a good start. However we should go a step further and make sure we don't have "soft" references to "copy unique selector" anywhere else:
1. the menu item id: <menuitem id="node-menu-copyuniqueselector" [...] should probably be changed to node-menu-copycssselector
2. the command callback oncommand="inspector.copyUniqueSelector()"/> should probably be changed to "copyCSSSelector()"

Of course for both of these changes, you need to update all the other files that are relying on this id and on this function name.
The file devtools/client/inspector/inspector-panel.js is defining the callback as well as using the id, so it should be updated. We also have 2 tests in devtools/client/inspector/test/ that use the id. I'll let you search for them. Everywhere you make a change, pay attention to the surrounding document and comments. If there is any wording that still mentions "unique selector", would be good to update it as well.

Commit message
===============
Your commit message should follow the pattern described at https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#Commit_Message_Conventions

For example here it could be something like "Bug 1106437 - rename inspector context menu entry to Copy CSS Selector;r=jdescottes"
The r=jdescottes part is just so that I am marked as a reviewer. We can usually leave this out of the commit messages until we know who will review. Here I think it's safe to assume it will be me though.

Good luck with this!
Again, if you are not sure about the process, try to visit IRC, you will get support faster than through emails/bugzilla/github.
Marking this as a duplicate of bug 1211613. Sorry, I see that there has been some work done here (mostly dev env/workflow setup so far hopefully though), but we're re-organizing the whole menu and updating strings in bug 1211613, so it's better to do this one in that bug too, instead of working on 2 similar things in 2 separate bugs and having merge issues.

@agore1: There are plenty of other bugs you could help with if you want. Here are some suggestions:
- bug 1256948: contains a series of small eslint cleanups for the webconsole,
- bug 1158612: simple style change for links in the perf tool
- bug 970047: adding a new screenshot button to the responsive design tool
You can see all [good first bugs] here: http://mzl.la/1rtQbg4
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1211613
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.