-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: add favorite applications (V2) #41555
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
Merged
+848
−30
Merged
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2ea0ad0
Working on favorites application and virtual workspace
salevine 6625359
Adding favorites for applications
salevine 91b3e97
fix: remove unused ApplicationPayload import from ce/actions/applicat…
salevine 3094280
revert: remove export from ee/actions/applicationActions to avoid pre…
salevine ad85f62
Fix favorites limit, correct home page bug, address permissions issue
salevine c8e7267
Fix found issues
salevine d4065de
Fix a few more bugs to avoid unnnecessary re-renders
salevine 82d542e
Adjust favorite icon and fix new workspace creation issue. Also addre…
salevine f5c0aec
Address favorites possibly overwriting non-favorites and better error…
salevine eb2635e
Fix minor card permission issue
salevine a9b7911
Addressed code review concerns
salevine 1863d2c
Addressed code rabbit conerns
salevine 710f2df
Addressing comments
salevine c4f4e5b
Update ApplicationPageServiceImpl.java
salevine 2c8fc7a
fix: favorites cleanup and review feedback
salevine c7b242c
fix: favorites saga error handling and validation
salevine 9c1d474
fix: make favorite icon a semantic button with a11y (Card)
salevine ffdad18
fix(favorites): redirect deleted-favorite 404 to Favorites and fix vi…
salevine 0555dfb
fix: extract inline JSX handlers into useCallback to fix lint warnings
salevine 90ab0af
fix(favorites): avoid duplicate favorite fetches and add toggle error…
salevine 396208b
refactor(favorites): decouple ApplicationCard permissions and separat…
salevine a674c75
fix(favorites): correct API URLs, normalize reducer IDs, and enforce …
salevine 26eca73
fix(favorites): scope 404-to-favorites redirect to only favorited apps
salevine 397b831
fix(favorites): make toggle fully atomic and handle new-user save races
salevine 72a8032
fix(favorites): use unfiltered app list for permissions lookup
salevine 56d760c
fix(favorites): decouple favorites loading from main app-loading indi…
salevine 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
This file contains hidden or 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,41 @@ | ||
| import { | ||
| ReduxActionErrorTypes, | ||
| ReduxActionTypes, | ||
| } from "ee/constants/ReduxActionConstants"; | ||
| import type { ApplicationPayload } from "entities/Application"; | ||
|
|
||
| export const toggleFavoriteApplication = (applicationId: string) => ({ | ||
| type: ReduxActionTypes.TOGGLE_FAVORITE_APPLICATION_INIT, | ||
| payload: { applicationId }, | ||
| }); | ||
|
|
||
| export const toggleFavoriteApplicationSuccess = ( | ||
| applicationId: string, | ||
| isFavorited: boolean, | ||
| ) => ({ | ||
| type: ReduxActionTypes.TOGGLE_FAVORITE_APPLICATION_SUCCESS, | ||
| payload: { applicationId, isFavorited }, | ||
| }); | ||
|
|
||
| export const fetchFavoriteApplications = () => ({ | ||
| type: ReduxActionTypes.FETCH_FAVORITE_APPLICATIONS_INIT, | ||
| }); | ||
|
|
||
| export const fetchFavoriteApplicationsSuccess = ( | ||
| applications: ApplicationPayload[], | ||
| ) => ({ | ||
| type: ReduxActionTypes.FETCH_FAVORITE_APPLICATIONS_SUCCESS, | ||
| payload: applications, | ||
| }); | ||
|
|
||
| export const fetchFavoriteApplicationsError = () => ({ | ||
| type: ReduxActionErrorTypes.FETCH_FAVORITE_APPLICATIONS_ERROR, | ||
| }); | ||
|
|
||
| export const toggleFavoriteApplicationError = ( | ||
| applicationId: string, | ||
| error: unknown, | ||
| ) => ({ | ||
| type: ReduxActionErrorTypes.TOGGLE_FAVORITE_APPLICATION_ERROR, | ||
| payload: { applicationId, error, show: false }, | ||
| }); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.