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

Feature/info message component #644

Merged
merged 5 commits into from
Nov 15, 2023

Conversation

JeanMarcMilletScality
Copy link
Contributor

Component:

InfoMessage

Description:

Design:

Breaking Changes:

  • [] Breaking Changes

Closes: #ISSUE_NUMBER

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

describe('useComputeBackgroundColor', () => {
it('should return backgroundlevel2 by default', () => {
//S
const SUT = jest.fn();
Copy link
Contributor

Choose a reason for hiding this comment

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

could be declared once and be more explicit

import { useComputeBackgroundColor } from './InfoMessageUtils';

type Props = {
title: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

i would make it possible to provide a ReactNode or a string here. It would allow use cases where we want to add icons or actions button towards the end of the title line.

Suggested change
title: string;
title: string | ReactNode;

color={defaultTheme.darkRebrand.infoPrimary}
size="lg"
/>
<Text isEmphazed>{title}</Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

I would check the typeOf title if it is a string then I would render it within the Text isEmphazed component, If it is a react node (else) I would render it directly

ref={containerRef}
style={{ backgroundColor: backgroundColor }}
>
<TitleContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

This component can likely be replaced by a Stack

Comment on lines 9 to 10
const SUT = jest.fn();

Copy link
Contributor

@JBWatenbergScality JBWatenbergScality Nov 15, 2023

Choose a reason for hiding this comment

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

As it is extracted you will need to add:

afterEach(() => {
SUT.mockClear()
})

Copy link
Contributor

@JBWatenbergScality JBWatenbergScality left a comment

Choose a reason for hiding this comment

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

LGTM

@JeanMarcMilletScality
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/1.0

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.0

Please check the status of the associated issue None.

Goodbye jeanmarcmilletscality.

@bert-e bert-e merged commit 04596ae into development/1.0 Nov 15, 2023
6 checks passed
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.

4 participants