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(ui): create separate pages for item share, publish and settings #971

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

LinaYahya
Copy link
Contributor

@LinaYahya LinaYahya commented Jan 24, 2024

image

@LinaYahya LinaYahya marked this pull request as ready for review January 26, 2024 15:28
@LinaYahya LinaYahya self-assigned this Jan 26, 2024
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! Removing all these tabs was really a good idea and removed bloating code, don't you think? Be careful of duplication, I think it can be easily avoided ;) Let me know if you have any questions.

Also UI reviews:

  • Should we have the back button outlined? I think we don't see it enough. (we discuss it on slack)
  • Clear chat button has a strange look now, was it all centered before?
Screenshot 2024-01-29 at 10 36 16

src/components/App.tsx Outdated Show resolved Hide resolved
src/components/common/ItemMetadataButton.tsx Outdated Show resolved Hide resolved
src/components/item/settings/ItemSettings.tsx Outdated Show resolved Hide resolved
src/components/item/settings/ThumbnailSetting.tsx Outdated Show resolved Hide resolved
src/components/main/ItemScreens/ItemScreen.tsx Outdated Show resolved Hide resolved
src/components/main/ItemScreens/ItemScreenLayout.tsx Outdated Show resolved Hide resolved
src/components/main/ItemScreens/PublishItemScreen.tsx Outdated Show resolved Hide resolved
src/components/main/ItemScreens/SettingsItemScreen.tsx Outdated Show resolved Hide resolved
src/langs/en.json Outdated Show resolved Hide resolved
src/langs/en.json Outdated Show resolved Hide resolved
@LinaYahya LinaYahya requested a review from pyphilia February 5, 2024 10:33
@pyphilia pyphilia force-pushed the 955-create-page-item-actions branch from 5938860 to ccf769a Compare February 6, 2024 16:09
cypress/e2e/item/publish/publishPage.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/item/share/shareItem.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/item/share/sharePage.cy.ts Outdated Show resolved Hide resolved
src/components/common/BackButton.tsx Outdated Show resolved Hide resolved
src/components/common/ItemMetadataButton.tsx Outdated Show resolved Hide resolved
<UppyContextProvider enable={enableEditing} itemId={itemId}>
<Box py={1} px={2}>
<Box display="flex" alignItems="center">
<BackButton onClick={() => navigate(buildItemPath(itemId))} />
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this create a "forward" navigation ? Maybe we could "rewind" the navigation ? But maybe that is a bit more involved ?

src/components/pages/item/ItemScreenLayout.tsx Outdated Show resolved Hide resolved
src/components/pages/item/type.ts Show resolved Hide resolved
Comment on lines +16 to +23
export const buildItemSettingsPath = (id = ':itemId'): string =>
`${ITEMS_PATH}/${id}/${ITEM_SETTINGS_PATH}`;
export const buildItemSharePath = (id = ':itemId'): string =>
`${ITEMS_PATH}/${id}/${ITEM_SHARE_PATH}`;
export const buildItemPublishPath = (id = ':itemId'): string =>
`${ITEMS_PATH}/${id}/${ITEM_PUBLISH_PATH}`;
export const buildItemInformationPath = (id = ':itemId'): string =>
`${ITEMS_PATH}/${id}/${ITEM_INFORMATION_PATH}`;
Copy link
Member

Choose a reason for hiding this comment

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

I think react-router-dom has some methods to resolve these paths depending on where they are created. look at useResolvedPath which allows to use a relative path that is then resolved to the absolute path depending where you are in the app.

src/langs/constants.ts Show resolved Hide resolved
Copy link
Member

@spaenleh spaenleh left a comment

Choose a reason for hiding this comment

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

Nice !

src/components/common/ItemMetadataButton.tsx Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Feb 7, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@pyphilia pyphilia merged commit 8489787 into main Feb 7, 2024
4 checks passed
@pyphilia pyphilia deleted the 955-create-page-item-actions branch February 7, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create page for share, publish, informations and settings
3 participants