Skip to content
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

feat: [UEPR-48] redesign welcome section #8936

Open
wants to merge 2 commits into
base: integration-branch-ux-12.2024
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ $background-color: hsla(0, 0%, 99%, 1); //#FDFDFD

$motion-blue-3: hsla(215, 60%, 50%, 1);//#3373CC

$ui-light-blue: hsla(195, 63%, 86%, 1);
$ui-cyan-blue: hsla(194, 73%, 36%, 1);

/* UI Secondary Colors */
/* 3.0 colors */
/* Using www naming convention for now, should be consistent with gui */
Expand All @@ -48,6 +51,7 @@ $ui-light-primary: hsl(215, 100%, 95%);
$ui-light-primary-transparent: hsla(215, 100%, 95%, 0);

$ui-border: hsla(0, 0%, 85%, 1); //#D9D9D9
$ui-border-light-blue: hsla(215, 50%, 90%, 1); //##D9E3F2
Copy link
Contributor

Choose a reason for hiding this comment

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

A nitpick or two that you don't have to address:

  1. the color here has a typo with two ##
  2. the colors added above don't have a comment with the RGB hex value


/* modals */
$ui-mint-green: hsl(163, 69%, 44%);
Expand Down
78 changes: 33 additions & 45 deletions src/components/welcome/welcome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,54 +18,42 @@ const Welcome = props => (
moreTitle="x"
title={props.messages['welcome.welcomeToScratch']}
>
<div className="welcome-col blue">
<h4>
<a
href={
shouldDisplayOnboarding(props.user, props.permissions) ?
'/projects/editor/' :
'/projects/editor/?tutorial=getStarted'
}
>
{props.messages['welcome.learn']}
</a>
</h4>
<div className="welcome-options">
<a
href={
shouldDisplayOnboarding(props.user, props.permissions) ?
'/projects/editor/' :
'/projects/editor/?tutorial=getStarted'
}
id="welcome.explore"
className="welcome-option-button"
href="/starter-projects"
>
{props.messages['welcome.explore']}
<img
alt="Get Started"
src="/images/welcome-learn.png"
alt="Starter Projects"
src="/images/explore_starter_projects.svg"
/>
</a>
</div>
<div className="welcome-col green">
<h4>
<a href="/starter_projects/">
{props.messages['welcome.tryOut']}
</a>
</h4>
<a href="/starter_projects/">
<a
id="welcome.community"
className="welcome-option-button"
href="/community_guidelines"
>
{props.messages['welcome.community']}
<img
alt="Starter Projects"
src="/images/welcome-try.png"
alt="Community Guidelines"
src="/images/learn_about_the_community.svg"
/>
</a>
</div>
<div className="welcome-col pink">
<h4>
<a href="/studios/146521/">
{props.messages['welcome.connect']}
</a>
</h4>
<a href="/studios/146521/">
<a
id="welcome.create"
className="welcome-option-button"
href={
shouldDisplayOnboarding(props.user, props.permissions) ?
'/projects/editor/' :
'/projects/editor/?tutorial=getStarted'
}
>
{props.messages['welcome.create']}
<img
alt="Connect"
src="/images/welcome-connect.png"
alt="Get Started"
src="/images/create_a_project.svg"
/>
</a>
</div>
Expand All @@ -75,9 +63,9 @@ const Welcome = props => (
Welcome.propTypes = {
messages: PropTypes.shape({
'welcome.welcomeToScratch': PropTypes.string,
'welcome.learn': PropTypes.string,
'welcome.tryOut': PropTypes.string,
'welcome.connect': PropTypes.string
'welcome.explore': PropTypes.string,
'welcome.community': PropTypes.string,
'welcome.create': PropTypes.string
}),
onDismiss: PropTypes.func,
permissions: PropTypes.object,
Expand All @@ -87,9 +75,9 @@ Welcome.propTypes = {
Welcome.defaultProps = {
messages: {
'welcome.welcomeToScratch': 'Welcome to Scratch!',
'welcome.learn': 'Learn how to make a project in Scratch',
'welcome.tryOut': 'Try out starter projects',
'welcome.connect': 'Connect with other Scratchers'
'welcome.explore': 'Explore Starter Projects',
'welcome.community': 'Learn about the community',
'welcome.create': 'Create a Project'
}
};

Expand Down
102 changes: 37 additions & 65 deletions src/components/welcome/welcome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,48 @@

.welcome {
.box-content {
padding: 0;
}

.welcome-col {
display: inline-block;
margin: 10px 15px;
width: 150px;
height: 253px;

h4 {
margin-top: 12px;
padding: 0;
font-weight: 200;
}

> a {
display: block;
margin-top: 20px;
margin-bottom: 35px;
height: 100px;
}
display: flex ;
flex-direction: column;
justify-content: center;
align-items: center;
flex: 1 1 100%;

$color-bars: "h4:before, > a:after";
padding: 0;

#{$color-bars} {
display: block;
margin: 10px 0;
border-radius: 5px;
.welcome-banner {
width: 100%;
height: 10px;
content: "";
}

img {
display: block;
max-width: 133px;
max-height: 100px;
}

&.blue {
#{$color-bars} {
background-color: $ui-blue;
}

a {
color: $ui-blue;
}

img {
margin-left: 4px;
}
}

&.green {
#{$color-bars} {
background-color: $ui-aqua;
}

a {
color: $ui-aqua;
}
font-size: 0.875rem;
font-weight: 500;
line-height: 1.125rem;
text-align: center;
color: $ui-cyan-blue;
background-color: $ui-light-blue;
padding: 0.625rem 0;
}

&.pink {
#{$color-bars} {
background-color: $ui-purple;
}

a {
color: $ui-purple;
.welcome-options {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
flex-wrap: wrap;

padding: 1.5rem 0;

.welcome-option-button {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;

width: 10rem;
height: 13rem;

border: 1px solid $ui-border-light-blue;
border-radius: 20px;

text-align: center;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/views/splash/l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"hocbanner.animateACharacter": "Animate a Character",

"welcome.welcomeToScratch": "Welcome to Scratch!",
"welcome.learn": "Learn how to make a project in Scratch",
"welcome.tryOut": "Try out starter projects",
"welcome.connect": "Connect with other Scratchers",
"welcome.explore": "Explore Starter Projects",
"welcome.community": "Learn about the community",
"welcome.create": "Create a Project",

"activity.seeUpdates": "This is where you will see updates from Scratchers you follow",
"activity.checkOutScratchers": "Check out some Scratchers you might like to follow",
Expand Down
6 changes: 3 additions & 3 deletions src/views/splash/presentation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
'general.viewAll': formatMessage({id: 'general.viewAll'}),
'news.scratchNews': formatMessage({id: 'news.scratchNews'}),
'welcome.welcomeToScratch': formatMessage({id: 'welcome.welcomeToScratch'}),
'welcome.learn': formatMessage({id: 'welcome.learn'}),
'welcome.tryOut': formatMessage({id: 'welcome.tryOut'}),
'welcome.connect': formatMessage({id: 'welcome.connect'}),
'welcome.explore': formatMessage({id: 'welcome.explore'}),
'welcome.community': formatMessage({id: 'welcome.community'}),
'welcome.create': formatMessage({id: 'welcome.create'}),
'intro.aboutScratch': formatMessage({id: 'intro.aboutScratch'}),
'intro.forEducators': formatMessage({id: 'intro.forEducators'}),
'intro.forParents': formatMessage({id: 'intro.forParents'}),
Expand Down
5 changes: 5 additions & 0 deletions src/views/splash/splash.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
}
}

.box.welcome {
display: flex;
flex-direction: column;
}

.news {
width: 40%;

Expand Down
Loading