Closed Bug 1569574 Opened 5 years ago Closed 5 years ago

Rename responsive.html/ to responsive/ and format using Prettier

Categories

(DevTools :: Responsive Design Mode, task, P3)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: pbro, Assigned: gl)

References

Details

Attachments

(2 files)

Prettier is now used throughout the mozilla-central repository to re-format JS files.
A few files and directories are still ignored for various reasons. In particular .html files are ignored. See https://searchfox.org/mozilla-central/rev/5e660d3dfcba897c8501e3fda1d415565a096e7e/.prettierignore#5.

It is unfortunate that RDM lives in a folder that contains the .html suffix though:
/devtools/client/responsive.html/

This means that all JS files within this directory are not being re-formatted by prettier.

We should either change the .prettierignore file to include RDM, or rename responsive.html to just responsive, or rdm. The .html suffix is historical and doesn't really have any meaning today.

I think we should rename this to just responsive since we don't have any folder names with just the acronym of the panel.

All of the following places will need to be changed: https://searchfox.org/mozilla-central/search?q=responsive.html&path=devtools

Also once we do this, then prettier will all-of-a-sudden re-format all files, so this may cause people to rebase their inflight patches.

Priority: -- → P3

For safety, let's do this as a three-part process:

  1. Add an exception to .prettierignore to add the responsive.html directory. Make sure this change is annotated such that our indexing tools understand that all the prettier changes are skipped for "blame".
  2. Do the actual renaming.
  3. Remove the exception from .pretterignore.

Hey @vporof, I am assuming a=automatic-formatting will cause the changeset to be ignored in our indexing tools and blame, however, let me know if we need to do more. Also, feel free to commandeer the patch if needed.

Flags: needinfo?(vporof)
Assignee: nobody → gl
Status: NEW → ASSIGNED

You'll need to add # skip-this-changset to the commit message, and populate the list at https://dxr.mozilla.org/mozilla-central/source/.hg-annotate-ignore-revs and https://dxr.mozilla.org/mozilla-central/source/.git-blame-ignore-revs

Flags: needinfo?(vporof)

See bug 1561435 as an example of the commit message, and bug 1563763 and bug 1564862 for adding the blame changesets.

Summary: RDM has been accidentally ignored from prettier → Rename responsive.html/ to responsive/ and format using Prettier
Blocks: 1572125
Pushed by gluong@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/40fa1e61d99f
Part 1: Rename the responsive.html/ folder to responsive/. r=pbro
https://hg.mozilla.org/integration/autoland/rev/3b3a2e363253
Part 2: Format devtools/client/responsive/. a=automatic-formatting r=vporof
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: