yjlintw / comic-reader

Comic Reader
GNU General Public License v3.0
101 stars 11 forks source link

CSS selector refactoring #8

Open yjlintw opened 7 years ago

yjlintw commented 7 years ago

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

fuluboy commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

@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