comic-reader icon indicating copy to clipboard operation
comic-reader copied to clipboard

CSS selector refactoring

Open yjlintw opened this issue 7 years ago • 4 comments

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 avatar Apr 18 '17 15:04 yjlintw

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

fuluboy avatar Apr 19 '17 02:04 fuluboy

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 avatar Apr 19 '17 02:04 yjlintw

@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 avatar Apr 19 '17 03:04 yjlintw

@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

yjlintw avatar Apr 19 '17 16:04 yjlintw