-
Notifications
You must be signed in to change notification settings - Fork 98
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
billy peng ui extract #822
Conversation
ok so i got voyager to run w the component library by going into |
wait now this branch it's working as expected after circle is still failing of course : \ |
I guess that Babel is not correctly applied to the imported components. |
@faboweb On second thought: it would be nice if our unit tests supported ES6 Modules -- it's a far better development cycle with |
I spent time trying to fix the tests here and on tendermint/ui, without much progress. The fact that Babel is transitioning to version 7, Vue is transitioning to version 3, and Jest is falling behind [1] is making this extra difficult. There's a complex dependency chain filled with incompatibilities, and CircleCI throws another wrench into the gears. An option we can look into in the near future is dropping Babel. We can start using ES modules in Electron already, with things like this [2][3] [1] jestjs/jest#4842 |
I'm getting errors like this with
UPDATE: These errors because webpack doesn't work properly for |
I used |
@@ -118,7 +118,7 @@ export default { | |||
} | |||
</script> | |||
<style lang="stylus"> | |||
.ni-form-group | |||
.tm-tm-form-group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tm-tm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch! 😄
@@ -0,0 +1,31 @@ | |||
<template lang="pug"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the VrToolBar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vr = Voyager got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@faboweb still need to improve code coverage, although there's not really any new code besides VrToolBar. Actually maybe removing code damaged the coverage report as the missing governance tests now have a larger effect? I think we need to figure out a system for deciding what goes into the ui library. There are a lot more common components but they're not being used outside of voyager atm. Should they be included in the library? in the PR? if they stay in voyager should we rename them all to Tm prefix? Vr? I did a search and replace on Also still need to get them published on npmjs.com, i'm not sure how that permission works. @nylira you have access right? will future updates always need to go through you or should we automate it somehow? I hate seeing npm packages that are behind their project repos... |
99% of this PR was due to @okwme awesome efforts. Great job. I'd suggest renaming Vr modules to Tm just to keep everything under the same namespace. We can keep single-use Tm components in Voyager for now, but as we continue to build front end projects we'll likely reuse them--and that's when we can move them out from this repo. If it's simple, I propose removing governance components from the coverage report. We're not working on governance yet. (We will be soon, as first version of governance is coming into the SDK). I have access to deploying new modules to the tendermint npm organization. I can give you access too, @okwme. But you need to enable 2FA on your NPM account first. Let me know. I don't know if we can automate publishing because every publish requires you to enter your OTP. How do we give our CI the OTP without compromising security? |
@nylira I've added 2FA to my npmjs.com account, my username is As for automating w CI I think you're probably right and it's not worth it for the security concern. Maybe instead we just add a git hook to check for the version number and give a reminder to |
app/networks/genesis.json
Outdated
@@ -0,0 +1,1459 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there this genesis.json now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not entirely sure where that came from. I replaced my genesis.json with the one you sent me last week. Does this one not match that one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The location is odd, as genesis.json usually belongs in a folder for a network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, maybe i had some sloppy drag and drop happening! * removing *
TmToolBar | ||
}, | ||
mounted() { | ||
// console.log(TmToolBar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to be called VrToolBar and it extended @tendermint/ui/TmToolBar because all voyager pages have those three slots in common. After the last review from @peng he suggested we name all the components Tm but made the names different withiin the component (tm-tool-bar versus vm-tool-bar) so that they would render without recursion.
it("has the expected html structure", async () => { | ||
await wrapper.vm.$nextTick() | ||
wrapper.update() | ||
// console.log(wrapper.vm.$el) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$nextTick is added for the scrollbar plugin
@@ -17,7 +17,9 @@ describe("PagePreferences", () => { | |||
}) | |||
}) | |||
|
|||
it("has the expected html structure if connected", () => { | |||
it("has the expected html structure if connected", async () => { | |||
await wrapper.vm.$nextTick() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$nextTick is added for the scrollbar plugin
@@ -40,7 +40,9 @@ describe("PageBlock", () => { | |||
wrapper.update() | |||
}) | |||
|
|||
it("has the expected html structure", () => { | |||
it("has the expected html structure", async () => { | |||
await wrapper.vm.$nextTick() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$nextTick is added for the scrollbar plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you maybe add comments describing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the timing of component rendering, and the need for a lot of wrapper.updates() occurred after moving the components into an external library that had to be explicitly included into babel during the jest tests.
Awesome! :) |
e2e tests failed but pass for me locally 😢 |
* quick fix for governance fees * changelog
Closes #820
Description: Replaces Ni components w Tm