Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d5ded55:
|
Deploying with
|
| Latest commit: |
35d6bc0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8411b27.baseweb.pages.dev |
| Branch Preview URL: | https://message-card.baseweb.pages.dev |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5069 |
src/message-card/utils.ts
Outdated
| it does not pass accessibility contrast tests for either white or black text.` | ||
| ); | ||
| } | ||
| if (LIGHT_COLORS.includes(backgroundColor)) { |
There was a problem hiding this comment.
I thought about using a map instead of an array for LIGHT_COLORS and DARK_COLORS so I can get constant time lookup here. Seems like the performance gain is negligible, but let me know if you disagree.
src/message-card/types.js.flow
Outdated
| overrides?: MessageCardOverridesT, | ||
| }; | ||
|
|
||
| export type StyledRoot = StyletronComponent< |
There was a problem hiding this comment.
I'm not entirely confident that these exports at the bottom here are correctly typed -- please take a close look.
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
src/message-card/constants.ts
Outdated
| This source code is licensed under the MIT license found in the | ||
| LICENSE file in the root directory of this source tree. | ||
| */ | ||
| export const BACKGROUND_COLOR_TYPE = { |
There was a problem hiding this comment.
BACKGROUND_COLOR_TYPE is bulky. Welcoming suggestions for alternate ways to name this constant.
| export { default as MessageCard } from './message-card'; | ||
| export * from './constants'; | ||
| export * from './styled-components'; | ||
| export * from './types'; |
There was a problem hiding this comment.
MessageCard uses the secondary and tertiary values from the Button's KIND constant. Does it make sense to duplicate that constant in MessageCard's constants.ts file and expose it? Or should devs using MessageCard import the KIND constant from baseui/button?
There was a problem hiding this comment.
I ended up creating a BUTTON_KIND constant to export from MessageCard. I couldn't get the docs site working otherwise.
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
src/message-card/types.ts
Outdated
| onClick: (a: SyntheticEvent<HTMLButtonElement>) => unknown; | ||
| heading?: string; | ||
| paragraph?: string; | ||
| buttonLabel?: string; |
There was a problem hiding this comment.
Design uses the word "Call to Action" instead of "Button". Semantically, "Call to Action" is more accurate since the entire MessageCard surface is a tap target, whereas the button itself is inert. But it seems to me that anyone familiar with Base Web would think of this element as "Button" since it does use the Base Web Button component. Open to suggestions.
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
2 similar comments
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
1 similar comment
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
Cloudflare was failing to build due to node running out of memory
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5070 |
Co-authored-by: UberOpenSourceBot <UberOpenSourceBot@users.noreply.github.com>
|
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #5085 |
src/message-card/utils.ts
Outdated
| it does not pass accessibility contrast tests for either white or black text.` | ||
| ); | ||
| } | ||
| if (LIGHT_COLORS.includes(backgroundColor)) { |
Description
New
MessageCardcomponentScope
Minor: New Feature