Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jordan/388 profile #449

Merged
merged 12 commits into from
Feb 7, 2018
Merged

Jordan/388 profile #449

merged 12 commits into from
Feb 7, 2018

Conversation

jbibla
Copy link
Collaborator

@jbibla jbibla commented Feb 5, 2018

this is a PR that simplifies the user profile page and the delegate profile page. both candidates and validators can now use PageDelegate as their profile pages. i also removed a lot of unused code.

closes #388

@jbibla jbibla requested a review from mappum February 5, 2018 22:38
@jbibla jbibla requested a review from nylira as a code owner February 5, 2018 22:38
@codecov
Copy link

codecov bot commented Feb 5, 2018

Codecov Report

Merging #449 into develop will increase coverage by 0.4%.
The diff coverage is 90%.

@@            Coverage Diff            @@
##           develop    #449     +/-   ##
=========================================
+ Coverage    75.79%   76.2%   +0.4%     
=========================================
  Files           91      90      -1     
  Lines         1409    1387     -22     
  Branches        69      66      -3     
=========================================
- Hits          1068    1057     -11     
+ Misses         321     312      -9     
+ Partials        20      18      -2
Impacted Files Coverage Δ
app/src/renderer/components/wallet/PageSend.vue 90.9% <ø> (ø) ⬆️
app/src/renderer/components/common/TextBlock.vue 33.33% <ø> (ø) ⬆️
app/src/renderer/routes.js 100% <ø> (ø) ⬆️
app/src/renderer/vuex/modules/blockchain.js 60.86% <ø> (-1.64%) ⬇️
...p/src/renderer/components/staking/PageDelegate.vue 100% <100%> (+9.52%) ⬆️
app/src/renderer/components/common/PageProfile.vue 75% <80%> (+17.85%) ⬆️

@nylira
Copy link
Contributor

nylira commented Feb 6, 2018

Ah this may have been better made on top of my #427 PR. A lot of the changes are duplicated.

Copy link
Collaborator

@faboweb faboweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add screenshots of the changed pages plz?

computed: {
...mapGetters(['user']),
userInfo () {
console.log(this.user)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it intended to leave this in? userInfo will be null I guess and is not used in the component

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. i will remove.

div(slot="menu"): tool-bar
router-link(to="/validators" exact)
i.material-icons arrow_back
.label Back

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this will be a completely empty page? is this one of the components we don't use anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will delete this file.

let wrapper, store, router
let {mount} = setup()
let wrapper
let store = new Vuex.Store({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you choose to remove the helper?

Copy link
Collaborator Author

@jbibla jbibla Feb 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming i understand correctly... because the helper installs localVue.use(VueRouter). $route becomes read only and cannot be set manually (overridden) in the test.

https://vue-test-utils.vuejs.org/en/guides/using-with-vue-router.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but before it worked with router.push('/staking/delegates/pubkeyX') or not?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it worked before with router.push because there were no params involved.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The route is defined as /staking/delegates/:delegate :delegate is the param you want to get in the component. When you push the route /staking/delegates/pubkeyX it will set the param delegate to pubkeyX. This is how it worked before.
As already mentioned, I would like to change the test setup back to using vuex-setup for consistency and to also test vuex-actions existence (lite e2e testing).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH! ok! let me try that out. that would be better!

@jbibla
Copy link
Collaborator Author

jbibla commented Feb 7, 2018

simple profile page where the word "Validator" will change to "Candidate" if the delegate is not a validator. removed all data that is not available. generic for all delegates.

screen shot 2018-02-07 at 11 16 29 am

@faboweb faboweb merged commit a792626 into develop Feb 7, 2018
@faboweb faboweb deleted the jordan/388-profile branch February 7, 2018 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validator profile design improvements
3 participants