-
Notifications
You must be signed in to change notification settings - Fork 620
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
ODC-7727: Favoriting page in the Console admin perspective #14765
base: main
Are you sure you want to change the base?
Conversation
@lokanandaprabhu: This pull request references ODC-7727 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/retest |
b3c5f17
to
315038c
Compare
@lokanandaprabhu: This pull request references ODC-7727 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/retest |
@lokanandaprabhu: This pull request references ODC-7727 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.scss
Show resolved
Hide resolved
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.
A few markup and CSS suggestions.
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.scss
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.scss
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.scss
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/nav/FavoriteNavItemResources.scss
Show resolved
Hide resolved
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lokanandaprabhu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@lokanandaprabhu: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
LGTM |
@@ -0,0 +1,29 @@ | |||
.oc-favorite-delete-button { |
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.
In console-app package we prefix the class name with co. Update the classname
.oc-favorite-delete-button { | |
.co-favorite-delete-button { |
@@ -50,6 +50,7 @@ export const LOG_WRAP_LINES_USERSETTINGS_KEY = `${USERSETTINGS_PREFIX}.log.wrapL | |||
export const SHOW_YAML_EDITOR_TOOLTIPS_USER_SETTING_KEY = `${USERSETTINGS_PREFIX}.showYAMLEditorTooltips`; | |||
export const SHOW_YAML_EDITOR_TOOLTIPS_LOCAL_STORAGE_KEY = `${STORAGE_PREFIX}/showYAMLEditorTooltips`; | |||
export const SHOW_FULL_LOG_USERSETTINGS_KEY = `${USERSETTINGS_PREFIX}.show.full.log`; | |||
export const FAVORITES_LOCAL_STORAGE_KEY = `${STORAGE_PREFIX}/favorites`; |
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.
Can we move this const to the same place where FAVORITES_CONFIG_MAP_KEY
is defined?
@@ -196,23 +199,32 @@ export const PageHeading = connectToModel((props: PageHeadingProps) => { | |||
<span className="co-m-pane__heading-badge">{badge}</span> | |||
)} | |||
{link && <div className="co-m-pane__heading-link">{link}</div>} | |||
{showActions && ( | |||
{(perspective === 'admin' || showActions) && ( |
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.
Do we need perspective === 'admin'
checks as we have the same checks below at line no. 204?
{hasButtonActions && ( | ||
<ActionButtons actionButtons={buttonActions.map((a) => a(kindObj, data))} /> | ||
{perspective === 'admin' && ( | ||
<div> |
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.
Is this div required here? I do not see any change after removing it.
@@ -113,5 +113,7 @@ | |||
@import 'components/dashboard/project-dashboard/activity-card'; | |||
@import 'components/dashboard/project-dashboard/details-card'; | |||
|
|||
@import 'components/utils/favorite-button'; |
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.
Is there a specific reason for importing this style here? It can only be imported into the favorite component, as it is used by that component.
const handleNameChange = (value: string) => { | ||
const alphanumericRegex = /^[a-zA-Z0-9- ]*$/; | ||
if (!alphanumericRegex.test(value)) { | ||
setError(t('Name can only contain letters, numbers, spaces, and hyphens.')); |
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.
setError(t('Name can only contain letters, numbers, spaces, and hyphens.')); | |
setError(t('public~Name can only contain letters, numbers, spaces, and hyphens.')); |
Story:
https://issues.redhat.com/browse/ODC-7727
Demo:
Screen.Recording.2025-02-14.at.12.06.10.PM.mov
----- Maximum count reached---
Screen.Recording.2025-02-17.at.3.14.55.PM.mov