-
Notifications
You must be signed in to change notification settings - Fork 36.6k
Alpha website candidate #462
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
Conversation
Good work 😄 First simple suggestion: fix the column width to avoid column resize on search. Thank you for pushing this idea forward 😄 |
Definitely! Few suggestions:
I'll review the code later on :) |
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.
Initial review.
src/index.html
Outdated
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" type="text/css" href="styles.css"/> | ||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/> | ||
<script src="https://unpkg.com/vue"></script> |
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.
Let's use the minified version of Vue https://unpkg.com/vue@2.4.2/dist/vue.min.js
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.
Also the JS should be in the footer ;)
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.
Or at least async
;)
src/scripts.js
Outdated
@@ -0,0 +1,72 @@ | |||
loadJSON(function(response) { |
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.
We shouldn't need to wait to load the JSON before the page kicks in, this will slow down the initial rendering. I'd say we opt for promises too.
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.
YOu can use the created() function on the Vue instance itself to load the data, so everything thing else can initialise while you wait.
Like this 😄 https://codepen.io/mikestreety/pen/jLYGbW
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.
Yes!
src/scripts.js
Outdated
xobj.send(null); | ||
} | ||
|
||
function filterRows() { |
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.
I have a feeling this can be done with Vue itself. Leave it with me, I'll pull down the branch and have a play later.
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.
I've not looked at the code too much, but could the filtering be done like 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.
Exactly this!
src/styles.css
Outdated
@@ -0,0 +1,48 @@ | |||
body { | |||
border-collapse: collapse; | |||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; |
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.
Can we use a nicer font-stack, maybe something from Google Fonts?
Sorry if everyone got loads of notifications - I cocked up the review ;) Sorted now! |
Thanks for the great feedback everyone! I've made the following improvements:
I will update S3 as well. |
src/index.html
Outdated
<div id="app"> | ||
<div class=center-text> |
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.
Missing quotes.
src/index.html
Outdated
</body> | ||
<footer> |
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.
We don't need these tags.
Side note - I've never used Vue.js before, but I'm liking the functionality so far! |
Merging this in to start second iteration. |
:) |
I've uploaded my alpha site candidate to an S3 bucket, viewable here. It utilizes Vue over JQuery and Bootstrap, minimizing libraries and crazy amounts of minified file fun. I'm more than happy to listen to suggestions on this plan, but I am going to keep pressing forward in this direction. There is still plenty of work to be done here, such as loading the JSON file locally to speed up the table rendering.