-
Notifications
You must be signed in to change notification settings - Fork 853
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
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 fc97fa6
feat: [UEPR-67] added learn more section
MiroslavDionisiev c270466
feat: [UEPR-90] Added new section to the ideas page
MiroslavDionisiev de60f74
refactor: [UEPR-67] Changed title text
MiroslavDionisiev 6eda196
feat: [UEPR-67] Added alternative texts for images on guidelines page
MiroslavDionisiev 05f053f
refactor: [UEPR-67] removed top border
MiroslavDionisiev ceefbbf
Merge pull request #8865 from MiroslavDionisiev/UEPR-67
MiroslavDionisiev 94984d7
chore: [UEPR-90] Removed unused texts
MiroslavDionisiev 0cc1091
Merge pull request #8873 from MiroslavDionisiev/UEPR-90
MiroslavDionisiev 226780c
feat: [UEPR-48] redesign welcome section
MiroslavDionisiev 85e9886
refactor: [UEPR-90] fixed gap between components and how pdfs open
MiroslavDionisiev 53531ac
Merge pull request #8941 from MiroslavDionisiev/UEPR-90
MiroslavDionisiev 9cc53b6
Merge remote-tracking branch 'origin/develop' into integration-branch…
MiroslavDionisiev 1b76b92
feat: [UEPR-88] added modal for written guides
MiroslavDionisiev 33a3752
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev 4038e22
chore: [UEPR-48] added hex vslues for colours
MiroslavDionisiev 4570d11
uepr-108:renamed css class
Bogomil-Stoyanov 7858ede
Merge remote-tracking branch 'origin/develop' into integration-branch…
MiroslavDionisiev 118e980
uepr-108:scoped css classname
Bogomil-Stoyanov 67150a0
Merge pull request #8969 from Bogomil-Stoyanov/bug/uepr-108-admin-panel
Bogomil-Stoyanov 3b0f521
Reordered rendering of elements, made the video render before it is v…
Bogomil-Stoyanov 2f90533
Changed player loading logic
Bogomil-Stoyanov 7830c6a
Fixed comments
Bogomil-Stoyanov bc2e296
Renamed props
Bogomil-Stoyanov 848521a
Removed old unneccessary style
Bogomil-Stoyanov 08526e9
feat: [UEPR-116] add youtube video playlists and open videos in modal
MiroslavDionisiev ad94a3a
feat: [UEPR-116] added border radius to the bottom of the video iframe
MiroslavDionisiev 5c7b2cf
feat: [UEPR-121] add new banner with link to ideas project
MiroslavDionisiev a620162
Merge pull request #8936 from MiroslavDionisiev/UEPR-48
MiroslavDionisiev 1854d11
refactor: [UEPR-116] changed the default value for ROOT_URL
MiroslavDionisiev b975170
Merge pull request #8980 from Bogomil-Stoyanov/bug/uepr-118-player-so…
Bogomil-Stoyanov c9405ff
refactor: [UEPR-116] move playlist component to separate file
MiroslavDionisiev 8d205d6
refactor: [UEPR-116] removed video ordering
MiroslavDionisiev 8b4dae8
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev 4970a21
Merge pull request #8985 from MiroslavDionisiev/UEPR-121
MiroslavDionisiev 9210e37
Merge pull request #8984 from MiroslavDionisiev/UEPR-116
MiroslavDionisiev 44295ea
Merge remote-tracking branch 'origin/integration-branch-ux-12.2024' i…
MiroslavDionisiev 2230378
Merge pull request #8950 from MiroslavDionisiev/UEPR-88
MiroslavDionisiev dfa605e
chore: updated scratch-gui version
MiroslavDionisiev f6a8882
Merge remote-tracking branch 'upstream/develop' into integration-bran…
KManolov3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
overflow: scroll; | ||
text-shadow: none; | ||
|
||
&.hidden { | ||
&.collapsed { | ||
width: 10px; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
😎