Skip to content

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

Merged
merged 24 commits into from
Aug 20, 2017
Merged

Alpha website candidate #462

merged 24 commits into from
Aug 20, 2017

Conversation

davemachado
Copy link
Collaborator

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.

@yannbertrand
Copy link
Collaborator

Good work 😄

First simple suggestion: fix the column width to avoid column resize on search.

Thank you for pushing this idea forward 😄

@jbrooksuk
Copy link
Collaborator

First simple suggestion: fix the column width to avoid column resize on search.

Definitely!

Few suggestions:

  • Store the JSON in local storage
  • Add a manifest for offline usage (useful if you're on a train looking for something), similar to DevDocs.io

I'll review the code later on :)

Copy link
Collaborator

@jbrooksuk jbrooksuk left a 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>
Copy link
Collaborator

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

Copy link
Collaborator

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 ;)

Copy link
Collaborator

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) {
Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Collaborator

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() {
Copy link
Collaborator

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.

Copy link
Collaborator

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?

https://codepen.io/mikestreety/pen/XgYZEy

Copy link
Collaborator

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;
Copy link
Collaborator

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?

@mikestreety
Copy link
Collaborator

Sorry if everyone got loads of notifications - I cocked up the review ;) Sorted now!

@davemachado
Copy link
Collaborator Author

Thanks for the great feedback everyone! I've made the following improvements:

  • fixed column width (may want to tweak a bit so longer string columns get more space)
  • added AppCache manifest
  • Switched to Roboto font from Google Fonts
  • Use Vue to filter search results and fetch JSON (still want to look into a better JSON delivery method)

I will update S3 as well.

src/index.html Outdated
<div id="app">
<div class=center-text>
Copy link
Collaborator

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>
Copy link
Collaborator

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.

@davemachado
Copy link
Collaborator Author

Side note - I've never used Vue.js before, but I'm liking the functionality so far!

@davemachado
Copy link
Collaborator Author

Merging this in to start second iteration.

@davemachado davemachado merged commit 0e51a86 into public-apis:alpha-site Aug 20, 2017
@jbrooksuk
Copy link
Collaborator

:)

@davemachado davemachado deleted the site-plan branch August 22, 2017 03:21
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.

4 participants