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

ODC-7727: Favoriting page in the Console admin perspective #14765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lokanandaprabhu
Copy link
Contributor

@lokanandaprabhu lokanandaprabhu commented Feb 13, 2025

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

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 13, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 13, 2025

@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.

@openshift-ci openshift-ci bot requested review from sg00dwin and spadgett February 13, 2025 15:32
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/shared Related to console-shared kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Feb 13, 2025
@lokanandaprabhu
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@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:

Story:

https://issues.redhat.com/browse/ODC-7727

Demo:

Screen.Recording.2025-02-14.at.12.06.10.PM.mov

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.

@lokanandaprabhu
Copy link
Contributor Author

/cc @vikram-raj @sanketpathak

@lokanandaprabhu
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2025

@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:

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

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.

Copy link
Member

@rhamilto rhamilto left a 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.

@openshift-ci openshift-ci bot added the component/olm Related to OLM label Feb 19, 2025
Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lokanandaprabhu
Once this PR has been reviewed and has the lgtm label, please assign christoph-jerolimov for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

@lokanandaprabhu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 8ff1ead link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-gcp-console 8ff1ead link true /test e2e-gcp-console

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.

@rhamilto
Copy link
Member

LGTM

@@ -0,0 +1,29 @@
.oc-favorite-delete-button {
Copy link
Member

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

Suggested change
.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`;
Copy link
Member

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) && (
Copy link
Member

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>
Copy link
Member

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';
Copy link
Member

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.'));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
setError(t('Name can only contain letters, numbers, spaces, and hyphens.'));
setError(t('public~Name can only contain letters, numbers, spaces, and hyphens.'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/core Related to console core functionality component/olm Related to OLM component/shared Related to console-shared jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants