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: add short links feature (graasp/graasp#664) #861

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

ReidyT
Copy link
Contributor

@ReidyT ReidyT commented Nov 10, 2023

Add the short links feature in the frontend builder.
This feature allow admin members to create shorten links to simplify the sharing of items.

@ReidyT ReidyT added the feature New feature or request label Nov 10, 2023
@ReidyT ReidyT self-assigned this Nov 10, 2023
@ReidyT ReidyT requested review from spaenleh and pyphilia November 10, 2023 13:42
@ReidyT ReidyT force-pushed the 664-add-short-links-feature branch from 2f12bc6 to 2e0fb98 Compare November 14, 2023 13:27
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cypress/support/server.ts Outdated Show resolved Hide resolved
cypress/support/server.ts Outdated Show resolved Hide resolved
cypress/support/server.ts Outdated Show resolved Hide resolved
cypress/e2e/item/shortLink/shortLink.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/item/shortLink/shortLink.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/item/shortLink/shortLink.cy.ts Outdated Show resolved Hide resolved
cypress/support/server.ts Outdated Show resolved Hide resolved
src/components/item/sharing/ManageShortLink.tsx Outdated Show resolved Hide resolved
ReidyT added a commit that referenced this pull request Nov 20, 2023
- Remove unnecessary nested cypress waits
- Check the item path too in the isItemAdminAllowedForMember
- Add Skeleton when loading short links
- Allow to use Library platform for published items only
- Update checkShortLink by shortLinkAvailable
- Split ManageShortLink into smaller components
- Remove not null assertions
@ReidyT ReidyT force-pushed the 664-add-short-links-feature branch from cd4f3f7 to 0e7f59f Compare November 20, 2023 15:20
@ReidyT ReidyT requested a review from pyphilia November 23, 2023 11:29
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 the PR, I did a lot of comments, let me know if you have questions.

.github/workflows/cypress.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cypress/e2e/item/share/shareItem.cy.ts Show resolved Hide resolved
cypress/support/server.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/config/notifier.ts Outdated Show resolved Hide resolved
src/langs/fr.json Outdated Show resolved Hide resolved
src/utils/shortLink.ts Outdated Show resolved Hide resolved
ReidyT added a commit that referenced this pull request Nov 29, 2023
- Update the redirection host to the short link’s backend route (go.graasp.org for prod)
- Update mockGetShortLinksItem to filter by item id
- Update SDK version
- Adding changeVisibility test (part of tests from deleted shareItem)
- Update shareItem tests to test short links displayed links
- Moved short link test into share folder
- Replace alias by short link in translations
- Translates alias input
- Replace aliasUnchanged state by hasAliasChanged in ShortLinkDialogContent
- Regroup the useEffect in AliasValidation
- Set GraaspLogo as default icon when PlatformIcon get invalid platform
- Encapsulate debounce of API calls in a custom hooks
- Others minor improvements
@ReidyT ReidyT requested a review from pyphilia November 29, 2023 14:34
ReidyT added a commit that referenced this pull request Nov 30, 2023
- Remove unnecessary nested cypress waits
- Check the item path too in the isItemAdminAllowedForMember
- Add Skeleton when loading short links
- Allow to use Library platform for published items only
- Update checkShortLink by shortLinkAvailable
- Split ManageShortLink into smaller components
- Remove not null assertions
ReidyT added a commit that referenced this pull request Nov 30, 2023
- Update the redirection host to the short link’s backend route (go.graasp.org for prod)
- Update mockGetShortLinksItem to filter by item id
- Update SDK version
- Adding changeVisibility test (part of tests from deleted shareItem)
- Update shareItem tests to test short links displayed links
- Moved short link test into share folder
- Replace alias by short link in translations
- Translates alias input
- Replace aliasUnchanged state by hasAliasChanged in ShortLinkDialogContent
- Regroup the useEffect in AliasValidation
- Set GraaspLogo as default icon when PlatformIcon get invalid platform
- Encapsulate debounce of API calls in a custom hooks
- Others minor improvements
@ReidyT ReidyT force-pushed the 664-add-short-links-feature branch from f55765a to 808f949 Compare November 30, 2023 07:43
- The view is not responsive yet
- Contain problems yet with the SDK and the query-client

feat: improve UI, add translations and messages (graasp/graasp#664)
- Update the UI to be more responsive
- Update the UI to not allow to edit or create multiple short links at same time
- Add membership admin check to hide short links view if forbbiden
- Add notifier for short links actions and show error messages to the user

feat: add Context colours in ShortLink view and use last SDK types

test: add short links cypress tests (graasp/graasp#664)

chore: add ENV variable for redirection host

fix(test): remove shortLinkRenderId should exist to pass in CI

chore: improve code form PR (#861)
- Remove unnecessary nested cypress waits
- Check the item path too in the isItemAdminAllowedForMember
- Add Skeleton when loading short links
- Allow to use Library platform for published items only
- Update checkShortLink by shortLinkAvailable
- Split ManageShortLink into smaller components
- Remove not null assertions

test: try to debug cypress in CI

fix: add redirection host environment variable in cypress CI

feat: update short links to future merge with full links

feat: add shortlinks skeletons and move ManageShortLink dialog to parent

feat: allow readers to display short links in read only mode

feat: remove ShareItem component

chore: update query-client, sdk and translations NPM version
- query-client v2.1.0
- sdk v3.2.0
- translations v1.21.0

test: udpate the shortlink test for read only members

chore: improve the code from the PR #861
- Update the redirection host to the short link’s backend route (go.graasp.org for prod)
- Update mockGetShortLinksItem to filter by item id
- Update SDK version
- Adding changeVisibility test (part of tests from deleted shareItem)
- Update shareItem tests to test short links displayed links
- Moved short link test into share folder
- Replace alias by short link in translations
- Translates alias input
- Replace aliasUnchanged state by hasAliasChanged in ShortLinkDialogContent
- Regroup the useEffect in AliasValidation
- Set GraaspLogo as default icon when PlatformIcon get invalid platform
- Encapsulate debounce of API calls in a custom hooks
- Others minor improvements

chore: improve aliasAvailable check and make the item's platforms static
- Use Boolean wrapper to check the aliasAvailable in AliasValidation.tsx
- Set the item’s platforms static in the ShortLinkRenderer.tsx
@spaenleh spaenleh force-pushed the 664-add-short-links-feature branch from 808f949 to b3d2e7d Compare December 1, 2023 08:11
@spaenleh spaenleh merged commit 946d8d8 into main Dec 1, 2023
3 checks passed
@spaenleh spaenleh deleted the 664-add-short-links-feature branch December 1, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request v2.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants