Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

CSS selector refactoring #8

Open
yjlintw opened this issue Apr 18, 2017 · 4 comments
Open

CSS selector refactoring #8

yjlintw opened this issue Apr 18, 2017 · 4 comments
Assignees
Milestone

Comments

@yjlintw
Copy link
Owner

yjlintw commented Apr 18, 2017

Idea/Suggestion about CSS naming rules/refactoring:

Javascripts files that use css selectors are
./renderer-process/content-loader.js
./renderer-process/search-view.js
./renderer-process/favorite-view.js
./renderer-process/read-view.js
./renderer-process/view-switcher.js

@yjlintw yjlintw changed the title CSS selector Refactoring CSS selector fefactoring Apr 18, 2017
@yjlintw yjlintw changed the title CSS selector fefactoring CSS selector refactoring Apr 18, 2017
@yjlintw yjlintw assigned yjlintw, prolong7341 and fuluboy and unassigned yjlintw Apr 18, 2017
@yjlintw yjlintw added this to the v0.2.0 milestone Apr 18, 2017
@fuluboy
Copy link
Collaborator

fuluboy commented Apr 19, 2017

Share my naming rules about stylesheets.

I. Parent-Child relationships

EX:

// Search View
.searchView {
}
.searchView-title {
}

II. Modifiers

EX:

// input
.input{
  &:hover {
  }
  &.small{
  }
  &.large{
  }
}

@yjlintw Update: code formatting

@yjlintw
Copy link
Owner Author

yjlintw commented Apr 19, 2017

Sounds nice. The javascripts that are using css selectors are

./renderer-process/content-loader.js
./renderer-process/favorite-view.js
./renderer-process/read-view.js
./renderer-process/view-switcher.js

Which are the View-Controllers I have mentioned in the WIKI page (and only View-Controllers should be allowed to access css-selectors)
It would be nice if you can change the selectors in those file when we are doing the refactoring

@yjlintw
Copy link
Owner Author

yjlintw commented Apr 19, 2017

@fuluboy I think at this moment, you are the most experienced front-end developer among this team. I think you can go ahead and decide the naming rules. It would be nice if you can give us a naming rule guidelines that everyone can follow.

I think naming rules/refactoring should be done as early as possible (am I right?). Let us know if you need any help.

@yjlintw
Copy link
Owner Author

yjlintw commented Apr 19, 2017

@fuluboy as I am implementing the subscription update at this moment. The favorite entry in the favorite view will need a class called .hasupdate(or something similar) which will affect the UI so the user can know that subscribed comic has new updates.

Right now I just change the background color because it is easy to implement and test. We can change the indicator later.
screen shot 2017-04-19 at 12 16 33

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants