Closed Bug 1054794 Opened 10 years ago Closed 8 years ago

GaiaHeader directory is wrongly named

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kgrandon, Assigned: kgrandon)

References

Details

Attachments

(1 file)

Our coding standards dictate lowercase_and_underscored filenames. We unfortunately do not yet have a linter for this, but as these components are new, we should strive to follow the convention.

The gaia-header folder should be renamed to gaia_header.
Attached file Github pull request
Hey Yan, Wilson,

We need to fix these directory paths. Could one of you guys review it? Thanks!
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Attachment #8474279 - Flags: review?(yor)
Attachment #8474279 - Flags: review?(wilsonpage)
Comment on attachment 8474279 [details] [review]
Github pull request

kgrandon: It isn't that simple I'm afraid, Bower names these directories, not us. The name is derived from the repo/package name, which is named after the custom-element's name.

It will be far to disruptive to rename the repo/package at this stage, and offers little benefit. It would be a lot easier for us to rename the the other directories in shared/elements/ to use the '-' style.
Attachment #8474279 - Flags: review?(yor)
Attachment #8474279 - Flags: review?(wilsonpage)
Attachment #8474279 - Flags: review-
This is partly why I wanted to have a designated 'third-party external components' directory, that wasn't linted or tested inside the Gaia project. Having internal and external components in the same directory is confusing.
Comment on attachment 8474279 [details] [review]
Github pull request

(In reply to Wilson Page [:wilsonpage] from comment #3)
> This is partly why I wanted to have a designated 'third-party external
> components' directory, that wasn't linted or tested inside the Gaia project.

All directories and files *need* to have the proper path conventions for consistency and workflow state. We should probably back things out that don't meet this requirement.

Why can we not have a simple script to move these into the proper location, would this help? E.g., make bower-install gaia-header - this could install the component and move it into the right location.

Thoughts on landing this and having a script to move the component into the right folder?
Attachment #8474279 - Flags: review- → feedback?(wilsonpage)
(In reply to Kevin Grandon :kgrandon from comment #4)
> Why can we not have a simple script to move these into the proper location,
> would this help? E.g., make bower-install gaia-header - this could install
> the component and move it into the right location.
> 
> Thoughts on landing this and having a script to move the component into the
> right folder?

I guess this is possible, but it will add further complexity and potential for breakage. For example, when components want to load sub-dependencies (eg. gaia-icons) they will be assuming they can load 'defined-components-url/gaia-icons/style.css' as that is the package-name. If we rename the packages once they are installed, we're essentially changing their ID.
Flags: needinfo?(kgrandon)
Attachment #8474279 - Flags: feedback?(wilsonpage)
Well it sounds like we're trying to implement a rather inflexible tool in a poor way. I need to think about this, but seems like having another folder for external components might be the way to go.
Flags: needinfo?(kgrandon)
(In reply to Kevin Grandon :kgrandon from comment #6)
> Well it sounds like we're trying to implement a rather inflexible tool in a
> poor way. I need to think about this, but seems like having another folder
> for external components might be the way to go.

I think a separate folder would also be good to make it clear to contributors what code is/isn't editable. Just as everyone knows node_modules/ is read-only. Also it's starting to get a bit confusing when we're fetching packages like 'gaia-theme' from a directory called 'elements'.
This work isn't important anymore.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: