Skip to content

Commit

Permalink
Remove most titles from home for a cleaner UI
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementPasteau committed Oct 3, 2024
1 parent ecd984e commit 8c612ba
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,7 @@ const BuildSection = ({

const skeletonLineHeight = getProjectLineHeight({ isMobile });
const pageContent = showAllGameTemplates ? (
<SectionContainer
title={<Trans>All templates</Trans>}
backAction={() => setShowAllGameTemplates(false)}
>
<SectionContainer backAction={() => setShowAllGameTemplates(false)}>
<SectionRow>
<GridList
cols={columnsCount}
Expand All @@ -435,7 +432,6 @@ const BuildSection = ({
</SectionContainer>
) : (
<SectionContainer
title={<Trans>My projects</Trans>}
showUrgentAnnouncements={shouldDisplayAnnouncements}
renderFooter={
limits && hasTooManyCloudProjects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const CommunitySection = () => {
announcements && announcements.length > 0;

return (
<SectionContainer title={<Trans>Community</Trans>} showUrgentAnnouncements>
<SectionContainer showUrgentAnnouncements>
<SectionRow>
<ColumnStackLayout noMargin expand>
{shouldDisplayAnnouncementsTitle && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ const EducationMarketingSection = ({
return (
<I18n>
{({ i18n }) => (
<SectionContainer title={<Trans>GDevelop for education</Trans>}>
<SectionContainer>
<SectionRow>
<ResponsiveLineStackLayout noColumnMargin>
<ColumnStackLayout noMargin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@ const DesktopDisplay = ({
});
}
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout noMargin>
{questionsPropsToRender.map((props, index) => (
<UserSurveyQuestion
Expand Down Expand Up @@ -245,11 +242,7 @@ const MobileDisplay = ({
return (
<I18n>
{({ i18n }) => (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
noScroll
>
<SectionContainer flexBody noScroll>
<div
style={{
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ const GetStartedSection = ({
!recommendationsGettingDelayPromise.current
) {
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -311,10 +308,7 @@ const GetStartedSection = ({

if (!isOnline || errorSendingSurvey) {
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -364,10 +358,7 @@ const GetStartedSection = ({

if (step === 'login') {
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -428,10 +419,7 @@ const GetStartedSection = ({

if (step === 'register') {
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -499,10 +487,7 @@ const GetStartedSection = ({
if (step === 'welcome') {
const isNewUser = profile && Date.now() - profile.createdAt < ONE_WEEK;
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -591,10 +576,7 @@ const GetStartedSection = ({

if (step === 'surveyFinished') {
return (
<SectionContainer
title={null} // Let the content handle the title.
flexBody
>
<SectionContainer flexBody>
<ColumnStackLayout
noMargin
expand
Expand Down Expand Up @@ -627,7 +609,6 @@ const GetStartedSection = ({
return (
<>
<SectionContainer
title={<Trans>Start making games</Trans>}
flexBody
showUrgentAnnouncements={shouldDisplayAnnouncements}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const MainPage = ({
] = React.useState<Tutorial | null>(null);

return (
<SectionContainer title={<Trans>Help and guides</Trans>}>
<SectionContainer>
<SectionRow>
<WikiSearchBar />
</SectionRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ const ManageSection = ({

if (openedGame) {
return (
<SectionContainer
flexBody
title={null} // Use a smaller title below
backAction={onBack}
>
<SectionContainer flexBody backAction={onBack}>
<Text size="title" allowSelection>
{openedGame.gameName}
</Text>
Expand Down Expand Up @@ -137,7 +133,7 @@ const ManageSection = ({
}

return (
<SectionContainer flexBody title={<Trans>Manage Games</Trans>}>
<SectionContainer>
<SectionRow expand>
{!profile ? (
<Paper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ const PlaySection = () => {
});

return (
<SectionContainer
title={<Trans>Play!</Trans>}
flexBody
subtitleText={<Trans>Explore games made by others</Trans>}
>
<SectionContainer flexBody>
<SectionRow expand>
<iframe
src={`https://gd.games/embedded/${paletteType}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const styles = {

type Props = {|
children: React.Node,
title: React.Node,
title?: React.Node,
titleAdornment?: React.Node,
titleAction?: React.Node,
subtitleText?: React.Node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ const StoreSection = ({
);

return (
<SectionContainer
title={null /* Give the asset store the full space to display */}
flexBody
noScroll
>
<SectionContainer flexBody noScroll>
<AssetStore
onOpenPrivateGameTemplateListingData={
onOpenPrivateGameTemplateListingData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const TeamSection = React.forwardRef<Props, TeamSectionInterface>(
if (!groupedMembers) {
return (
<>
<SectionContainer title={<Trans>Team</Trans>}>
<SectionContainer>
<SectionRow>
<Line>
<Column noMargin expand alignItems="center">
Expand Down Expand Up @@ -343,7 +343,6 @@ const TeamSection = React.forwardRef<Props, TeamSectionInterface>(
return (
<>
<SectionContainer
title={<Trans>Teach</Trans>}
renderSubtitle={() => (
<div style={styles.educationCardContainer}>
<EducationCard
Expand Down

0 comments on commit 8c612ba

Please sign in to comment.