Skip to content

New layout for code examples including thumbnail - #66

Merged
fdoflorenzano merged 17 commits into
mainfrom
code-examples-layout-test
Feb 17, 2022
Merged

fdoflorenzano merged 17 commits into
mainfrom
code-examples-layout-test

Conversation

@bravomartin

@bravomartin bravomartin commented Feb 14, 2022 •

Copy link
Copy Markdown
Collaborator

DRAFT PR - Do not merge

This PR improves the layout for code examples, adding the possibility of having a thumbnail and a description.
The links have been condensed to use up less space:

  • open: open in web editor
  • 📔 view code in github (using maru emoji font)
  • 💾 download code (using maru emoji font)

I did a free interpretation to define the icons. I'm very open to using a different emoji or creating a custom icon, and also to change the hierarchy.

If and when we confirm this direction I should replace the dummy images with the option of linking a thumbnail from a file in the repo.

image

@ghost

ghost commented Feb 14, 2022 •

Copy link
Copy Markdown

Gatsby Cloud Build Report

thecodingtrain.com

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 28s

Performance

Lighthouse report

Metric Score
Performance 🔶 47
Accessibility 🔶 84
Best Practices 💚 100
SEO 🔶 77

🔗 View full report

@shiffman

Copy link
Copy Markdown
Member

oooooh, I love this!!!!

@bravomartin

Copy link
Copy Markdown
Collaborator Author

I love that you love more work @shiffman :)

@fdoflorenzano

Copy link
Copy Markdown
Collaborator

I also like how it turned out! It's approved in the visuals at least :)

@shiffman Now, we gotta figure out how to to actually add this in the content folders. I'll continue the discussion in a new issue: #68

@bravomartin

Copy link
Copy Markdown
Collaborator Author

@shiffman

Copy link
Copy Markdown
Member

You can see it in action here:

https://thecodingtraincom-codeexampleslayouttest.gtsb.io/tracks/code-programming-with-p5-js/tracks/main-tracks/code/intro/random-function-p5-js-tutorial

Playing around with it, my instinct was to click on the thumbnail and the example titles. I wonder if we should do away with "open" and have whatever the default way to view the examples is (p5 web editor, github link) just be the example itself and then we can have extra buttons? On the existing site when I have a Processing and p5.js version they are listed as separate examples. . could we add a Processing button for the ports?

If only I knew someone who had access to the logo designs. . . .

@bravomartin

Copy link
Copy Markdown
Collaborator Author

You came to the right place, @shiffman : )

We could definitely do something like that but before we get there we should figure out the data structure for code examples. Lets discuss that in issue #68

@fdoflorenzano

Copy link
Copy Markdown
Collaborator

I updated both back-end and front-end with the setup discussed in #68 . I also went ahead and included #70 .

Some new screenshots:
Screen Shot 2022-02-16 at 15 18 17
Screen Shot 2022-02-16 at 15 18 38
Screen Shot 2022-02-16 at 15 18 55

@shiffman

Copy link
Copy Markdown
Member

This is so good, yay! My only last question is related to color. Blue is for coding challenges and pink/red for tracks? I trust your visual design sensibility much more than mine but is it too noisy/messy to keep the p5 pink and Processing blues in their logos regardless of which page they are featured on? Tell me if this is a bad idea! That was just my reaction to seeing p5 in blue!

@fdoflorenzano

Copy link
Copy Markdown
Collaborator

Yeah tracks are red and challenges are blue. We think leaving the original colors does give some weird noise in that section, considering how consistent is the schema in the rest of these pages, and how there is some overlap in colors (p5 is pinkish and processing uses lots of blues). But the coloring change does make the logo least recognizable. I just pushed another try using a neutral dark gray that is used in the rest of the site, and leaves logos consistent between challenge/tracks views. We reverted back to no square logo since it made a huge dark block next to very light icons.

@shiffman Let us know what you think!

https://build-f935984e-d0d3-41f5-a192-cbd0333dbcfa.gtsb.io/tracks/code-programming-with-p5-js/tracks/main-tracks/code/intro/random-function-p5-js-tutorial
https://build-f935984e-d0d3-41f5-a192-cbd0333dbcfa.gtsb.io/challenges/77-recursion
https://build-f935984e-d0d3-41f5-a192-cbd0333dbcfa.gtsb.io/challenges/163-bezier-curves

@shiffman

Copy link
Copy Markdown
Member

Ok, I think we have a winner! Yay, thanks for all your extra work on this! We can always fine-tune this a bit later once we see how characters and other emojis find their way into the site! Yay! 🚀

@fdoflorenzano fdoflorenzano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

😄

@fdoflorenzano
fdoflorenzano merged commit 0fcb7b3 into main Feb 17, 2022
@fdoflorenzano
fdoflorenzano deleted the code-examples-layout-test branch February 17, 2022 12:33
@fdoflorenzano fdoflorenzano mentioned this pull request Feb 17, 2022
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.

3 participants