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

Integration branch ux 12.2024 #8988

Merged
merged 40 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9134f6a
feat: [UEPR-67] restyle community guidelines page
MiroslavDionisiev Oct 28, 2024
fc97fa6
feat: [UEPR-67] added learn more section
MiroslavDionisiev Oct 30, 2024
c270466
feat: [UEPR-90] Added new section to the ideas page
MiroslavDionisiev Nov 1, 2024
de60f74
refactor: [UEPR-67] Changed title text
MiroslavDionisiev Nov 5, 2024
6eda196
feat: [UEPR-67] Added alternative texts for images on guidelines page
MiroslavDionisiev Nov 7, 2024
05f053f
refactor: [UEPR-67] removed top border
MiroslavDionisiev Nov 14, 2024
ceefbbf
Merge pull request #8865 from MiroslavDionisiev/UEPR-67
MiroslavDionisiev Nov 14, 2024
94984d7
chore: [UEPR-90] Removed unused texts
MiroslavDionisiev Nov 14, 2024
0cc1091
Merge pull request #8873 from MiroslavDionisiev/UEPR-90
MiroslavDionisiev Nov 14, 2024
226780c
feat: [UEPR-48] redesign welcome section
MiroslavDionisiev Nov 18, 2024
85e9886
refactor: [UEPR-90] fixed gap between components and how pdfs open
MiroslavDionisiev Nov 19, 2024
53531ac
Merge pull request #8941 from MiroslavDionisiev/UEPR-90
MiroslavDionisiev Nov 19, 2024
9cc53b6
Merge remote-tracking branch 'origin/develop' into integration-branch…
MiroslavDionisiev Nov 19, 2024
1b76b92
feat: [UEPR-88] added modal for written guides
MiroslavDionisiev Nov 22, 2024
33a3752
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev Nov 22, 2024
4038e22
chore: [UEPR-48] added hex vslues for colours
MiroslavDionisiev Nov 22, 2024
4570d11
uepr-108:renamed css class
Bogomil-Stoyanov Nov 28, 2024
7858ede
Merge remote-tracking branch 'origin/develop' into integration-branch…
MiroslavDionisiev Nov 28, 2024
118e980
uepr-108:scoped css classname
Bogomil-Stoyanov Nov 28, 2024
67150a0
Merge pull request #8969 from Bogomil-Stoyanov/bug/uepr-108-admin-panel
Bogomil-Stoyanov Nov 28, 2024
3b0f521
Reordered rendering of elements, made the video render before it is v…
Bogomil-Stoyanov Dec 1, 2024
2f90533
Changed player loading logic
Bogomil-Stoyanov Dec 1, 2024
7830c6a
Fixed comments
Bogomil-Stoyanov Dec 1, 2024
bc2e296
Renamed props
Bogomil-Stoyanov Dec 2, 2024
848521a
Removed old unneccessary style
Bogomil-Stoyanov Dec 2, 2024
08526e9
feat: [UEPR-116] add youtube video playlists and open videos in modal
MiroslavDionisiev Dec 3, 2024
ad94a3a
feat: [UEPR-116] added border radius to the bottom of the video iframe
MiroslavDionisiev Dec 3, 2024
5c7b2cf
feat: [UEPR-121] add new banner with link to ideas project
MiroslavDionisiev Dec 3, 2024
a620162
Merge pull request #8936 from MiroslavDionisiev/UEPR-48
MiroslavDionisiev Dec 3, 2024
1854d11
refactor: [UEPR-116] changed the default value for ROOT_URL
MiroslavDionisiev Dec 3, 2024
b975170
Merge pull request #8980 from Bogomil-Stoyanov/bug/uepr-118-player-so…
Bogomil-Stoyanov Dec 3, 2024
c9405ff
refactor: [UEPR-116] move playlist component to separate file
MiroslavDionisiev Dec 4, 2024
8d205d6
refactor: [UEPR-116] removed video ordering
MiroslavDionisiev Dec 4, 2024
8b4dae8
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev Dec 4, 2024
4970a21
Merge pull request #8985 from MiroslavDionisiev/UEPR-121
MiroslavDionisiev Dec 4, 2024
9210e37
Merge pull request #8984 from MiroslavDionisiev/UEPR-116
MiroslavDionisiev Dec 4, 2024
44295ea
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev Dec 4, 2024
2230378
Merge pull request #8950 from MiroslavDionisiev/UEPR-88
MiroslavDionisiev Dec 4, 2024
dfa605e
chore: updated scratch-gui version
MiroslavDionisiev Dec 4, 2024
f6a8882
Merge remote-tracking branch 'upstream/develop' into integration-bran…
KManolov3 Dec 4, 2024
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
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"regenerator-runtime": "0.13.9",
"sass": "1.81.0",
"sass-loader": "10.5.2",
"scratch-gui": "5.0.1",
"scratch-gui": "5.1.0",
"scratch-l10n": "5.0.7",
"selenium-webdriver": "4.26.0",
"slick-carousel": "1.8.1",
Expand Down
7 changes: 7 additions & 0 deletions src/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@ $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); //#C5E7f2
$ui-cyan-blue: hsla(194, 73%, 36%, 1); //#19809F

/* UI Secondary Colors */
/* 3.0 colors */
/* Using www naming convention for now, should be consistent with gui */
$ui-aqua: hsla(144, 45%, 36%, 1);
$ui-aqua-dark: darken($ui-aqua, 10%);
$ui-purple-light: hsla(260, 100%, 88%, 1); // #DACEF3
$ui-purple: hsla(260, 100%, 70%, 1); // #9966FF Looks Primary
$ui-purple-dark: hsla(260, 60%, 60%, 1); // #855CD6 Looks Secondary
$ui-purple-darker: hsla(260, 46%, 54%, 1);
$ui-purple-10percent: hsla(260, 60%, 60%, .1);
$ui-purple-25percent: hsla(260, 60%, 60%, .25);
$ui-magenta: hsla(300, 53%, 60%, 1); /* #CF63CF Sounds Primary */
$ui-magenta-dark: hsla(300, 48%, 50%, 1); /* #BD42BD Sounds Tertiary */
$ui-light-grayish-blue: hsla(215, 76%, 95%, 1);

$ui-yellow: hsla(45, 100%, 50%, 1); // #FFBF00 Events Primary
$ui-coral: hsla(350, 100%, 70%, 1); // #FF6680 More Blocks Primary
Expand All @@ -48,6 +53,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

/* modals */
$ui-mint-green: hsl(163, 69%, 44%);
Expand All @@ -59,6 +65,7 @@ $active-dark-gray: hsla(0, 0%, 0%, .2);
$box-shadow-gray: hsla(0, 0%, 0%, .25);
$box-shadow-light-gray: hsla(0, 0%, 0%, .15);
$overlay-gray: hsla(0, 0%, 0%, .75);
$gray-50: hsla(226, 15%, 97%, 1);
$transparent-light-blue: rgba(229, 240, 254, 0);

/* Typography Colors */
Expand Down
2 changes: 1 addition & 1 deletion src/components/adminpanel/adminpanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const AdminPanel = ({
onOpen,
onClose
}) => (
<div className={classNames('admin-panel', className, {hidden: !isOpen})}>
<div className={classNames('admin-panel', className, {collapsed: !isOpen})}>
Copy link
Contributor

Choose a reason for hiding this comment

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

😎

{isOpen ? (
<React.Fragment>
<span
Expand Down
2 changes: 1 addition & 1 deletion src/components/adminpanel/adminpanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
overflow: scroll;
text-shadow: none;

&.hidden {
&.collapsed {
width: 10px;
}

Expand Down
143 changes: 143 additions & 0 deletions src/components/cards-modal/cards-modal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import React, {useCallback, useState} from 'react';
import ReactModal from 'react-modal';
import PropTypes from 'prop-types';
import Button from '../forms/button.jsx';
import {FormattedMessage, useIntl} from 'react-intl';
import ModalNavigation from '../modal-navigation/modal-navigation.jsx';

import './cards-modal.scss';

const GUIDES_SECTIONS = [
{
titleId: 'ideas.modalSectionTitleSpritesAndSounds',
imgSrc: '/images/ideas/sprites-sounds.svg',
cards: [
{
cardId: 'ideas.modalCardNameCreateSprite',
hrefId: 'guides.ScratchLearningResource_CreateOriginalSpriteLink'
},
{
cardId: 'ideas.modalCardNameRemix',
hrefId: 'guides.ScratchLearningResource_RemixRe-imagineSpritesLink'
},
{
cardId: 'ideas.modalCardNameBringDrawingsIntoScratch',
hrefId: 'guides.ScratchLearningResource_BringYourDrawingsIntoScratchLink'
},
{
cardId: 'ideas.modalCardNameSound',
hrefId: 'guides.ScratchLearningResource_SoundsAddRecordText-to-SpeechLink'
},
{
cardId: 'ideas.modalCardNameCreateAsset',
hrefId: 'guides.ScratchLearningResource_CreateanAssetPackLink'
}
]
},
{
titleId: 'ideas.modalSectionTitleAdvancedTopics',
imgSrc: '/images/ideas/advanced-topics.svg',
cards: [
{
cardId: 'ideas.modalCardNameConditionalStatements',
hrefId: 'guides.ScratchLearningResource_ConditionalStatementsLink'
},
{
cardId: 'ideas.modalCardNameVariablesLists',
hrefId: 'guides.ScratchLearningResource_VariablesandListsLink'
},
{
cardId: 'ideas.modalCardNameCustomBlocks',
hrefId: 'guides.ScratchLearningResource_MyBlocksLink'
},
{
cardId: 'ideas.modalCardNameFaceSensing',
hrefId: 'cards.paperplanes-turtlegraphics-cardsLink'
},
{
cardId: 'ideas.modalCardNameComputationalConcepts',
hrefId: 'cards.facesensing-cardsLink'
}
]
}
];

export const CardsModal = ({isOpen, onClose = () => {}}) => {
const [currentPage, setCurrentPage] = useState(0);
const intl = useIntl();
const onNextPage = useCallback(() => {
if (currentPage < GUIDES_SECTIONS.length - 1) {
setCurrentPage(currentPage + 1);
}
}, [currentPage]);
const onBackPage = useCallback(() => {
if (currentPage > 0) {
setCurrentPage(currentPage - 1);
}
}, [currentPage]);

if (!isOpen) return null;
return (
<ReactModal
isOpen={isOpen}
onRequestClose={onClose}
className="cards-modal-container"
overlayClassName="cards-modal-overlay"
>
<div className="cards-modal-header">
<div className="cards-title">
<FormattedMessage id={'ideas.modalTitle'} />
</div>
<Button
className="close-button"
isCloseType
onClick={onClose}
/>
</div>
<div className="cards-modal-section-title">
<FormattedMessage id={GUIDES_SECTIONS[currentPage].titleId} />
</div>
<div className="cards-modal-section-content">
<img
className="section-img"
src={GUIDES_SECTIONS[currentPage].imgSrc}
/>
<div className="cards-modal-cards-list">
{GUIDES_SECTIONS[currentPage].cards.map(card => (
<div
key={card.cardId}
className="card"
>
<FormattedMessage id={card.cardId} />
<a
href={intl.formatMessage({
id: card.hrefId
})}
target="_blank"
rel="noopener noreferrer"
>
<Button>
<img src="/images/ideas/download-icon.svg" />
</Button>
</a>
</div>
))}
</div>
</div>
<ModalNavigation
currentPage={currentPage}
totalDots={GUIDES_SECTIONS.length}
nextButtonImageSrc="/images/ideas/right-arrow.svg"
prevButtonImageSrc="/images/ideas/left-arrow.svg"
onNextPage={onNextPage}
onBackPage={onBackPage}
className="cards-modal-navigation"
/>
</ReactModal>
);
};

CardsModal.propTypes = {
isOpen: PropTypes.bool,
onClose: PropTypes.func
};
150 changes: 150 additions & 0 deletions src/components/cards-modal/cards-modal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
@import "../../colors";
@import "../../frameless";

.cards-modal-overlay {
display: flex;
justify-content: center;
align-items: center;

position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 510;

background-color: $box-shadow-light-gray;
border-color: unset;
}

.cards-modal-container {
display: flex;
flex-direction: column;

background: white;
border-radius: 8px;
width: 640px;

box-shadow: 0 0 0 4px $ui-blue-25percent;

&:focus {
outline: none;
border: none;
}

.cards-modal-header {
display: flex;
justify-content: space-between;
align-items: center;

padding: 10px;
background-color: $ui-blue;
border-radius: 8px 8px 0 0;

.cards-title {
font-size: 1rem;
font-weight: 700;
line-height: 1.25rem;
color: $ui-white;
margin-left: auto;
margin-right: auto;
}

.close-button {
position: unset;
margin: 0;
}
}

.cards-modal-section-title {
text-align: center;
vertical-align: middle;

color: $header-gray;
font-size: 1.5rem;
font-weight: 700;
line-height: 2rem;

padding: 0.5rem 0;
margin: 0.75rem 0
}

.cards-modal-section-content {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin: 0 1.25rem;
gap: 1.25rem;

.section-img {
width: 200px;
}

.cards-modal-cards-list {
flex: 1;

.card {
display: flex;
justify-content: space-between;
align-items: center;

font-size: 0.875rem;
font-weight: 500;


.button {
display: flex;
justify-content: center;
align-items: center;
width: 2rem;
height: 2rem;
}
}

.card + .card {
border-top: 1px solid $box-shadow-light-gray;
}
}
}

.cards-modal-navigation {
justify-content: center;
align-items: center;
margin: 1.75rem 0;

.navigation-button {
padding: 0;
margin: 0 1rem;
}

.dotRow{
width: 32px;
height: 16px;
gap: 0.5rem;
}

.dot{
width: 8px;
height: 8px;
background-color: transparent;
border: 2px solid $ui-blue;
}

.active{
background-color: $ui-blue;
box-shadow: 0 0 0 4px $ui-blue-25percent;
}
}
}

.cards-modal-container:focus {
outline: none;
border: none;
}

@media only screen and (max-width: $mobileIntermediate) {
.cards-modal-container {
width: 100%;
}
}
Loading
Loading