wridgeu / github_pages

Development repository for my personal GitHub Pages site.
https://wridgeu.github.io/
Other
1 stars 0 forks source link

Refactor for a more State-Driven approach (increase model usage) #18

Open wridgeu opened 4 years ago

wridgeu commented 4 years ago

Try to use less direct access to view and control view via model (state) of the application => add more view-models and control the state of the view via those models instead of directly influencing it with .byId().

wridgeu commented 4 years ago

There is something like a single source of truth needed regarding theme toggling. It needs to somehow be managed by a model.

Model holds value whether or not we're in Dark or Light Mode -> According to the model Value we need to set some DOM-Data-Element or something like that in order to have a stable way to retrieve the current state of the theme - according to this we then have to adjust our CSS

wridgeu commented 4 years ago

The sidebar might be a good option to start with.

wridgeu commented 2 years ago

38

wridgeu commented 2 years ago

https://github.com/SAP-samples/devtoberfest-2021-frontend-coding-challenge/blob/sampleSolution/webapp/controller/MainView.controller.js#L42-L49

https://github.com/SAP-samples/devtoberfest-2021-frontend-coding-challenge/blob/sampleSolution/webapp/view/MainView.view.xml#L26-L28