[vtadmin-web] The tiniest possible first implementation of vtadmin-web#7218
Merged
rohit-nayak-ps merged 22 commits intovitessio:masterfrom Dec 23, 2020
Merged
Conversation
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
doeg
commented
Dec 22, 2020
| @@ -0,0 +1,100 @@ | |||
| /* | |||
Contributor
Author
There was a problem hiding this comment.
This file was thieved directly from https://github.com/vitessio/vitess/pull/7187/files#diff-eeea62c2adbce1061fd9db0eb38fcb936efb2e158ed0d332bfa5568db563a1c3
…radical act of pro-cuddling Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is the tiniest possible first implementation of vtadmin-web that "does something", even though that "something" (rendering static, albeit strongly typed, data) is simple and, honestly, a little dumb. 😎
That said, if you feel this is too simple + useless to merge, I'm happy to wait until we implement data fetching. However, pretty much anything interesting we'd want to do beyond this will require #7187 to be merged first. :)
Likely the best way to review this PR is to pull the branch and run it locally following the "Getting Started" section of the README. Please let me know if you run into any trouble + I would be delighted to help debug. 🙇♀️
Here's a screenshot of what it looks like with the⚠️ immense caveat ⚠️ that this UI is just a placeholder! I ✨ promise ✨ the real UI will be 10000x more amazing. 😁
Here's what it looks like when developing locally with
npm start. create-react-app's development server comes with all the devxp niceties you'd expect, like hot reloading:vtadmin-dev-setup.mov
Despite its (very!) humble appearance, this PR does a bunch of necessary, foundational work. I did my best to document everything in the README, but here's a brief tl;dr:
The front-end is scaffolded using create-react-app, since we all have (many, many) better things to do than to maintain webpack configs.
Everything is strongly typed with TypeScript. Even better, we generate TypeScript bindings and utility classes from the very same
.protofiles we use in vtadmin-api and elsewhere. 🎉 This means we get strongly typed API responses, even though we'll be using HTTP (rather than gRPC). So, in other words, even though this PR uses dumb fake data, that dumb fake data implements the exact same types we'll expect from our real API. :)On the topic of HTTP... for this PR, I did the simplest possible thing and defined a handful of fake tablets here. Once Initial vtadmin-api, clusters, and service discovery #7187 is merged, we can set up the data fetching layer (which will be using react-query!)... and then things will start getting interesting. 😼 It's also when I'll add the first tests and environment variables.
I've added a fairly comprehensive set of linters and formatters, as well as some notes on setting up VS Code for those that use it. I'm happy to add these to CI, although I'll have to read up on how GitHub Actions works. 😊
Examples of how we can use SCSS modules and
:rootvariables for styling are included. This is a set-up that's worked super well for the internal Vitess tooling we've built, and the best part is that it makes implementing dark mode super easy later on. 😎I'm happy to expound on any of the above! 😁
Related Issue(s)
Checklist
Deployment Notes
N/A (we'll add deployment notes once vtadmin-web and vtadmin-api are deployable together.)
Impacted Areas in Vitess
Components that this PR will affect: