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

fix(KFLUXUI-260): It's unclear to users from representation in UI that components must be unique per workspace #93

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

Conversation

janaki29
Copy link
Contributor

@janaki29 janaki29 commented Jan 21, 2025

Fixes

https://issues.redhat.com/browse/KFLUXUI-260)

Description

  1. Helper text is added for user conveying component names should be unique within tenant's namespace.
    Helper Text:** Must be unique within tenant namespace **

  2. When creating application, if component name is duplicate then error message is updated to following message:
    "Component already exists in this namespace. Edit the name to be unique and try again."

  3. Unique default component name suggested after adding a URL while creating an application.
    If same component name exists within namespace, then suffix "-[Ramndom Number]" is added.
    Example: Component "sample-component" already exists within namespace, so suggested default component added is
    "sample-component-50". Screenshot is also attached.

Type of change

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Screen shots / Gifs for design review

  1. Helper Text for Component Name Input
image
  1. Updated error message for duplicate Component Name
image

3.Unique Default Component name is suggested

image

@janaki29 janaki29 changed the title Application updates fix(KFLUXUI-260): It's unclear to users from representation in UI that components must be unique per workspace Jan 21, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.06%. Comparing base (5512b15) to head (df92b6a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
- Coverage   80.08%   80.06%   -0.02%     
==========================================
  Files         544      545       +1     
  Lines       21181    21196      +15     
  Branches     5064     5331     +267     
==========================================
+ Hits        16962    16971       +9     
- Misses       4195     4200       +5     
- Partials       24       25       +1     
Flag Coverage Δ
unittests 80.06% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/ImportForm/ComponentSection/ComponentSection.tsx 100.00% <100.00%> (ø)
...ents/ImportForm/ComponentSection/SourceSection.tsx 94.73% <100.00%> (+0.29%) ⬆️
src/components/ImportForm/GitImportForm.tsx 76.25% <100.00%> (-0.68%) ⬇️
src/components/ImportForm/error-utils.ts 37.50% <100.00%> (ø)
src/types/common-types.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5512b15...df92b6a. Read the comment docs.

Copy link
Contributor

@StanislavJochman StanislavJochman left a comment

Choose a reason for hiding this comment

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

LGTM

@janaki29 janaki29 requested a review from sahil143 January 29, 2025 12:42
Comment on lines +40 to +45
<HelperText>
<HelperTextItem>
Must be unique within tenant namespace{' '}
<span className="component-section-helper-text-namespace-highlighted">{namespace}</span>
</HelperTextItem>
</HelperText>
Copy link
Collaborator

Choose a reason for hiding this comment

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

use input field prop helperText to set the helper text,

Comment on lines +1 to +3
.component-section-helper-text-namespace-highlighted{
font-weight: 800;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing new line

Suggested change
.component-section-helper-text-namespace-highlighted{
font-weight: 800;
}
.component-section {
&__component-name {
&--helper-text {
font-weight: var(--pf-v5-global--FontWeight--bold);
}
}
}

src/components/ImportForm/GitImportForm.tsx Outdated Show resolved Hide resolved
@sahil143
Copy link
Collaborator

/test

@janaki29 janaki29 force-pushed the application-updates branch from 5809328 to df92b6a Compare February 14, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants