habitica/website/client
Keith Holliday 2e9bc2c31c New client guilds (#8736)
* add colors palette

* add secondary menu component and style it

* add box shadow to secondary menu

* misc css, fixes for secondary menu

* client: add equipment page with grouping, css: add some styles

* add typography

* more equipment

* stable: fix linting

* equipment: add styles (lots of general styles too)

* remove duplicate google fonts loading

* add dropdowns

* design: white search input background, remove gray from items

* start adding drawer and selected indicator

* wip equipment

* fix equipment

* equipment: correctly bind new properties on items.gear.equipped

* equipment: fix vue binding. version 2

* equipment: fix vue binding. version 3

* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed

* checkboxes and radio buttons

* correctly renders selected items in first postion during the first render

* add search

* general changes, constants part of app state, add popovers

* add toggle switch, rename css

* correct offset

* upgrade deps

* upgrade deps

* drawer and lot of other work

* update equipping mechanism

* finish equipment

* fix compilation and upgrade deps

* use v-show in place of v-if to fix ui issues

* v-show -> v-if

* Start of guild syyles

* fix linting in test/client

* fix es6 compilation in test/client

* fix babel compilation for tests

* fix groupsUtilities mixin tests

* More designs

* Added public guild state

* Added my guilds store

* client: buttons

* client: buttons: fix colors

* Added join and leave

* Began adding new guild form

* Create form updates

* Added search to local data

* Added filtering

* Added initial code for group create

* Added more create checks

* Added more guild routes

* Added styles to guild page

* Added more chat styles

* Began porting over angular functions

* Moved over group service functions

* Added paging

* Updated sidebar

* Updated join/leave and minor text

* Added new sidebar functions

* Updated paging

* Added some form updates

* Added more translations and styles

* Updated shrinkwrap

* Removed features config

* Lint cleanup

* Added member modal

* Added more member actions

* Updated nav

* Fixed filter toggling

* Updated create guild

* Added no guild page

* Added sort select

* Added more styles

* Added update guild form

* Removed extra css and other minor changes

* Many css and syntax fixes

* Fixed color and merge conflic

* Removed paging from my guilds

* Removed extra strings

* Many requests updates

* Small style fixes
2017-06-02 14:55:02 -06:00
..
assets New client guilds (#8736) 2017-06-02 14:55:02 -06:00
components New client guilds (#8736) 2017-06-02 14:55:02 -06:00
filters client: reorganize filters and add tests 2016-12-06 18:27:49 -08:00
libs Client: async resources, make store reusable, move plugins and add getTaskFor getter (#8575) 2017-03-18 18:33:08 +01:00
mixins New client guilds (#8736) 2017-06-02 14:55:02 -06:00
store New client guilds (#8736) 2017-06-02 14:55:02 -06:00
.babelrc Upgrade webpack to v2 and other deps (#8491) 2017-02-15 17:24:37 +01:00
.eslintrc Upgrade ESLint to v3 (#8299) 2016-12-20 22:31:36 +01:00
app.vue Client: semantic ui -> bootstrap 4 and less -> scss (#8535) 2017-03-06 20:09:34 +01:00
index.html Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631) 2017-05-16 21:09:55 +02:00
main.js Client Redesign: Inventory pages, secondary menu, misc css and design items (#8631) 2017-05-16 21:09:55 +02:00
readme.md (WIP) Thehollidayin/front end updates (#8278) 2016-12-29 13:24:08 -06:00
README.md Client/Inventory/Items (#8734) 2017-05-22 16:30:52 +02:00
router.js New client guilds (#8736) 2017-06-02 14:55:02 -06:00

#Running

  • Open a terminal and type npm run client:dev
  • Open a second terminal and type npm start

#Preparation Reading

  • Vue 2 (https://vuejs.org)

  • Webpack (https://webpack.github.io/) is the build system and it includes plugins for code transformation, right now we have: BabelJS for ES6 transpilation, eslint for code style, less and postcss for css compilation. The code comes from https://github.com/vuejs-templates/webpack which is a Webpack template for Vue, with some small modifications to adapt it to our use case. Docs http://vuejs-templates.github.io/webpack/

  • Were using .vue files that make it possible to have HTML, JS and CSS for each component together in a single location. Theyre implemented as a webpack plugin and the docs can be found here http://vue-loader.vuejs.org/en/

  • SemanticUI is the UI framework http://semantic-ui.com/. So far Ive only used the CSS part, it also has JS plugins but Ive yet to use them. It supports theming so if its not too difficult well want to customize the base theme with our own styles instead of writing CSS rules to override the original styling.

The code is in /website/client. Were using something very similar to Vuex (equivalent of Reacts Redux) for state management http://vuex.vuejs.org/en/index.html

The API is almost the same except that we dont use mutations but only actions because it would make it difficult to work with common code

The project is developed directly in the develop branch as long as well be able to avoid splitting it into a different branch.

So far most of the work has been on the template, so theres no complex logic to understand. The only thing I would suggest you to read about is Vuex for data management: its basically a Flux implementation: theres a central store that hold the data for the entire app, and every change to the data must happen through an action, the data cannot be mutated directly.