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: Revamp UI of Global Notifictaion Configuration #2318

Open
wants to merge 46 commits into
base: develop
Choose a base branch
from

Conversation

shivani170
Copy link
Contributor

@shivani170 shivani170 commented Dec 26, 2024

Description

feat: Revamp UI of Global Notifictaion Configuration
Screenshot 2024-12-26 at 6 50 23 AM

  • App Details Deployment Status Card
  • commit/tag/pr card padding
    //cards are wrapped in extra div

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@shivani170 shivani170 self-assigned this Dec 26, 2024
@github-actions github-actions bot added the PR:Issue-verification-failed PR:Issue-verification-failed label Dec 26, 2024
RohitRaj011
RohitRaj011 previously approved these changes Jan 6, 2025
Copy link

sonarqubecloud bot commented Jan 6, 2025

@shivani170 shivani170 mentioned this pull request Jan 9, 2025
9 tasks
…tion-test-case

chore: Notification test case id
Copy link

sonarqubecloud bot commented Jan 9, 2025

setState({ ...state, confirmation: false })
} catch (serverError) {
if (serverError instanceof ServerErrors && serverError.code === 500) {
setState({ ...state, showCannotDeleteDialogModal: true })
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove unneccessary setState

return this.state.webhookConfig
}
return this.state.smtpConfig
if (state.isLoading) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this duplicated line

type="button"
data-testid={`${tab.link}-tab-title`}
className={`tab-group__tab dc__unset-button-styles flexbox dc__gap-1 dc__hover-text-n90 dc__gap-6 px-10 py-4 fw-6 ${index === 0 ? 'dc__left-radius-4 ' : ''}
${index === getConfigurationTabTextWithIcon().length - 1 ? 'dc__right-radius-4' : ''} ${activeTab === tab.link ? 'bcn-1 fw-6 cn-9' : 'bcn-0'} cn-7`}
Copy link
Contributor

Choose a reason for hiding this comment

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

cn-7 should be inside the else case of isActive

Comment on lines +57 to +59
const awsRegionListParsed = awsRegionList
.sort((a, b) => stringComparatorBySortOrder(a.name, b.name))
.map((region) => ({ label: region.name, value: region.value }))
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be outside the component

case ConfigurationsTabTypes.WEBHOOK:
return <Webhook className={`icon-dim-${size}`} />
default:
return SES
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the default case

export const renderText = (text: string, isLink: boolean = false, linkTo?: () => void, dataTestId?: string) => (
<Tooltip content={text} placement="bottom" showOnTruncate={!!text} className="mxh-210 dc__hscroll" interactive>
{isLink ? (
<button
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be the new Button component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the button component, first letter of the text change to uppercase that's why avoided

return { isValid: true, message: '' }
}

export const getFormValidated = (isFormValid: FormValidation, fromEmail?: string): boolean => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please verify if this is required

isLoading: false,
isError: true,
}))
setFormValid({
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be inside the validateForm method

font-weight: inherit;
}

.ses-config-table__email {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these from component

color: var(--N900);
font-weight: inherit;
}
.configuration-tab__table-row:hover .slack-config-table__action,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use visible-hover rather that creating all these

}
}, [smtpConfigId, shouldBeDefault])
Copy link
Contributor

Choose a reason for hiding this comment

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

Why shouldBeDefault is a dependency?

event.preventDefault()
this.saveWebhookConfig()
}
if (!getAllFieldsValidated()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This code seems duplicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Issue-verification-failed PR:Issue-verification-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants