-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Re-vamp Redwood splash-page #3183
Conversation
67216a2
to
e8f2a21
Compare
Looking really good @alicelovescake and @margalit - thanks for all the effort into this. Just a headsup - for e2e tests to pass you'll need to modify this line here: https://github.com/redwoodjs/redwood/blob/main/tasks/e2e/cypress/integration/01-tutorial/tutorial.spec.js#L57 :) |
Thanks for the heads up! Super helpful. Just made the change to the test. |
Hey @alicelovescake!
Two options here: A) You can query the current redwood version from the graphql api. The query is query RedwoodVersion {
redwood {
version
}
} In this case, I would probably suggest just using fetch like this in the splash page: const response = await global.fetch(
`${global.__REDWOOD__API_PROXY_PATH}/graphql`,
{
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
query:
'query RedwoodVersion { redwood { version } }',
}),
} B) Provide the version at build time What do you think? |
I ran two identical usability tests, one for the dark mode and one for the light mode with unique participants for each (ie. no-one saw both versions). I ordered 30 responses for each test from an international panel with the the main targeting option being intermediate/advanced technical use. I was mainly trying to determine whether the messaging was clear and the interactive design elements on the page were obviously clickable for both dark and light mode variants. This was a very basic to check we hadn’t introduced any glaring usability blind spots. I followed up each question with two rating questions:
Where would you click to proceed?Dark variant
Light variant
Where would you click to get help?Dark variant
Light variant
SummaryWe can expect real engineers to perform better than these participants since they lack lots of the context for this page. They also have the benefit of being able to try multiple links. Worth noting that in unmoderated tools like this you can always expect a small level of noise in the results so I’m not overly concerned about the mis-clicks. Also don't worry that many of these percentages don't add up to 100%, just a quirk of the reporting. We may want to consider explicitly calling attention to where to find help since there wasn't a strong confidence in any of the choices presented. Where do we want people to go for help? Are we happy for people to head to the tutorial? If so might be worth updating this link to explicitly be the our first page since we can expect anyone seeing this screen to have performed the previous two steps. Based on these finding I’m relatively confident that both the light and dark variants are good design solutions with most people proceeding from this screen by clicking the Generate a new page link. |
68caf9c
to
eba31e1
Compare
Thanks @dac09 again for the useful tips! I implemented your approach 1 by querying the graphql api and it seems to work pretty well! It's in the latest commit. The version will now conditionally render when we are able to grab the latest release. |
Ear marking this for v0.37. Top job on this! |
Wow, this is a great start! Thank you so much @alicelovescake and @margalit 🚀 Don't take my suggestions below as specific directions/to-do's. This is going to take more discussion with you two and others. Please let me know what you think. And I'm fine to wait until others chime in. See Screenshot at Bottom with sections A) and B) A)This content is info that's based on state. Currently, it reads like a paragraph with an inline call-to-action, which I think we can make more clear/distinct. We need to account for two states:
When the home page Ideas:
B)A unique icon (along with the title) for each block header could help break up the visual scanning. I'm so mixed on the "Examples" section because the potential examples (To-Do app and Example Blog) aren't very 🤯 Also, they're both desperately in need of updating. Thoughts/suggestions? Section Titles:
Screenshot |
Co-authored-by: Sam Margalit <sam@margalit.com.au>
eba31e1
to
a692a81
Compare
Thanks for the actionable feedback @thedavidprice . Your explanation around when splash page should display was helpful. Here is what I've done in the new commit:
Notes Re: Examples resource: Having an example is helpful, we can always put it back if the examples are ever updated. That said, I picked the blog example because it has the most features and documentation. So up to the team what you guys think is more important to have on now! Re: Copywriting and CTA: I want to balance between having a strong CTA and being succinct. Happy to change or add any info that you think should be on there. No routes createdRouted created but no homepage |
|
||
interface SplashPageProps { | ||
hasGeneratedRoutes: boolean | ||
routes: any[] |
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.
Is there already an Interface for routes? I'm passing in an array of routes here and just using the type any []
because I couldn't find a type for routes
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.
Hey @alicelovescake - there is indeed a routes interface - you can import AvailableRoutes
from @redwoodjs/router
.
This particular interface gets updated dynamically (using type generation) based on the routes you have in the project.
Not sure if it makes sense to use here, but will leave that to your discretion.
This looks amazing @alicelovescake thanks so much for doing this! That dark mode... 👀 Redwood was heavily inspired by Rails and their first-run/onboard experience which is, arguably, not perfect, but here's what they do:
Rails routing syntax is much more advanced that ours, you can do all kinds of nesting and redirection so it can be tough to just read through the route file and immediately figure out what's going on. Ours is a much simpler syntax so we may not need that URL/CLI tool to display them all right now. My vote: I don't think we need that page to show forever until you route a homepage. It's not like create-react-app where you actually get that first setup page as a real component that exists in the project and you can easily remove it. In this case it ends up being a "magic" page that you can't do anything with. I'm thinking of an app where you spend the time building out the backend, before worrying about marketing pages, but you can't seem to get rid of that page. We've talked about adding a dev "toolbar" that's maybe a little 20px tall strip |
Thanks for providing the broader context and your vote @cannikin! Since your suggestion of removing the splash page when routes exists is different from what @thedavidprice suggested around having separate states, I'll let the team decide and make the change accordingly. Personally, I agree with you Rob that having a page a developer can't get rid of can be annoying. Yet, the alternative is the 404 page that they can't get rid of, and that can be equally annoying plus confusing like David mentioned. It comes down to which is a better DX experience. I think the splash page is less about showing them their current routes, as much as it is about helping the developer understand why they are looking at the page they are on. Looking forward to everyone's feedback! |
I'm all for improving the 404 page (in development) that gives a message like:
Generating a page creates a route as well, and you'll be good to go! I think if this is the first web application you've ever made, yes it could be confusing that the splash page goes away and now you're getting a 404. But for your second to infinite web app, you'll totally understand what's going on (there's no path/page defined in your Router). I don't think we're optimizing to someone's first ever web framework, though, so I'm okay with that! |
Co-authored-by: David Price <thedavid@thedavidprice.com>
Heya @alicelovescake and @thedavidprice. I played around with the styling and messaging, the key changes were:
My thinking was that explicitly using the term "path" would make more sense since this is the prop that needs to be edited in the router to make this screen go away. I’m also using the Dark
Light
Here are the four commits if you’d like to cherry-pick them, they also contain a few subtle styling and layout changes. Let me know if you’d prefer a PR: |
Hi @margalit The Page+Path idea is good DX as that's what a dev will see in Routes.js file. Keep it! My initial questions were more about information architecture, specifically shifting visual attention onto the Page Links once they are generated. The following comments are referring to the screenshot below. I'm open to discussion and pushback about any of the following comments. Lastly, thank you for taking the time to dig into the details here. This is the initial experience with Redwood for everyone — it's worth the time and effort! Section 1.aOnce a page (other than Section 1.bThis is effectively a title and seems too long. Maybe "List of Pages by path" or something similar? Section 2This feels like a callout section. Currently, it's given visual priority being first and having the same type treatment as the next sentence (which is the description/title). I also suggest adding the instructions to create a home page; |
Hi @thedavidprice, thank you for the feedback. I absolutely agree it is worth spending the time to make this a nice experience seeing as it will be the first introduction to Redwood for many people. I’ll try not to hold this up since we've all agreed it is a better experience. I wonder if the information architecture is getting lost since I’m currently treating it as "step two" of the splash page rather than a "routes page". I think it would help if we either: a) Explicitly make this a two step splash screen by adding a checklist for both steps ie:
b) Replace the page once we have any pages with a "routes page"
Let me know the preferred approach—they’ll both mean developers won't hit errors after generating their first page. If we go with b) we might be able to make this page publicly available in the future in development (similar to rails routes page). |
Completely agree with this aspect being challenging:
And this might be a reason why, in the long run, we end up with another solution for what I suggested is the core problem to focus on solving, i.e. "after the dev server is started or a page is generated, the user should not immediately encounter an error page". However, for now I don't think we should re-work this existing implementation with either of your suggestions A) or B) above. (Maybe in a follow-up PR after further discussion in an Issue?) For now, I'd really like to get this PR merged to be included with v0.37 (publishing later this week). I know I got fancy and introduced IA (😉), but to summarize the crux of my suggestions ==> I just don't want anyone to miss seeing the list of page/route links, which I think can be avoided in this PR via layout and styling. y/n/maybe? |
Status UpdateSam and I have been communicating on Discord to iterate more efficiently. This is in a good place and I'll coordinate to include in the v0.37 release. We can collaborate on CI errors once final version is in place. Thanks all! |
That's awesome! I'm here to lean in if you guys need any help to the finish line! |
Merging this now! Huge WELL DONE to both @alicelovescake and @margalit Appreciate all the work you put into this 🚀 |
* Re-vamp Redwood splash-page Co-authored-by: Sam Margalit <sam@margalit.com.au> * Minor formatting fixes * Modify cypress e2e test to account for changes in new splash page * Modify cypress test in tutorial-helix-envelop.spec for new splashpage * Dynamically update Redwood version on splashpage * Add logic to detect current route state and pass it into splashpage * Add icons to resource cards * Add whitespace and fix formatting * Remove console logs * Change contributing link Co-authored-by: David Price <thedavid@thedavidprice.com> * Clean up old e2e test * Update resource link to welcome post Co-authored-by: David Price <thedavid@thedavidprice.com> * Proper apostrophes for contractions * Remove body margin and center content * Code styles for dark mode * Clean up page list and make instruction more specific * Move useVersion into hook * Add callout and styles * Fix router tests * add E2E splash page assertion with timeout Co-authored-by: Sam Margalit <sam@margalit.com.au> Co-authored-by: David Price <thedavid@thedavidprice.com>
…rl-config * 'main' of github.com:redwoodjs/redwood: Add core-js to codemods dep for polyfills (#3448) add missing prepublish script (#3445) add missing deps (#3444) Remove codemods dependency on @redwoodjs/internal (#3443) Revert "add missing dep (#3441)" (#3442) add missing dep (#3441) Add @redwoodjs/codemods (#3411) Fix gitpod port forwarding (#3434) Re-vamp Redwood splash-page (#3183) Adds comments to directives and its templates (#3435) Readme updates to introduction technologies for GraphQL (#3433)
This PR proposes a new variation on Redwood's splash page. In collaboration with @margalit, we designed and implemented:
@margalit and I wanted to create this PR to get early feedback. Below are improvements we want to still work on:
Lightmode (desktop + mobile)
Darkmode (desktop + mobile)