This PR is an attempt at tidying up the api and vuex functions in the Hedera front end. Naming conventions are currently inconsistent, and functions that work with the same data models are not grouped together, making it harder to keep track of what methods of interacting with the back end are available in Vue.
To that end, this PR does the following:
Categorizes the api and vuex functions under headers based on what underlying Django models they interact with
Implements a consistent naming structure of dataModel_action for api and vuex functions. Since constants are all caps with words separated by underscores, they follow a structure of DATA_MODEL_ACTION.
Implements a consistent vocabulary for actions: get, list, create, update, delete. These actions may be modified if there is a specific part of the data model being accessed, as in profile_updateLang
Ensures that constants are used consistently where applicable. Many tests do not use constants for vuex actions and mutations, which is the convention used in the code base.
Propagates the name changes through the Vue code base to ensure that tests still pass and code style is respected.
There are a lot of changes to a lot of files, and looking at files changed will make it hard to assess what's changed. Instead, I recommend looking at the listed below. I'm finding that links to files within commits load a bit slowly, so for the second and third items give the page a few seconds to scroll to the right file.
This PR is an attempt at tidying up the api and vuex functions in the Hedera front end. Naming conventions are currently inconsistent, and functions that work with the same data models are not grouped together, making it harder to keep track of what methods of interacting with the back end are available in Vue.
To that end, this PR does the following:
dataModel_action
for api and vuex functions. Since constants are all caps with words separated by underscores, they follow a structure ofDATA_MODEL_ACTION
.get
,list
,create
,update
,delete
. These actions may be modified if there is a specific part of the data model being accessed, as inprofile_updateLang
There are a lot of changes to a lot of files, and looking at files changed will make it hard to assess what's changed. Instead, I recommend looking at the listed below. I'm finding that links to files within commits load a bit slowly, so for the second and third items give the page a few seconds to scroll to the right file.
Those are the conceptual changes, everything else is just making sure that Hedera still works with those changes in place.