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

✨ elevation options to Card/Banner/TopBar #2313

Merged
merged 10 commits into from
Jun 17, 2022

Conversation

oddvernes
Copy link
Collaborator

@oddvernes oddvernes commented Jun 15, 2022

resolves #2230

as per design directives, the allowed elevations are:
TopBar: none, raised
Banner: none, raised, overlay
Card: none, raised, overlay

This pr also removes max/min width on Paper

import { enabled as bannerToken } from './Banner.tokens'
import { Divider } from '../Divider'
import { BannerIcon } from './BannerIcon'
import { useEds } from '../EdsProvider'

const StyledBanner = styled.div``
type allowedElevations = keyof Pick<Elevations, 'none' | 'raised' | 'overlay'>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the type that users will see in their IDE, so maybe a nicer word, availableElevations ? Its also a type which means it should start with an Uppercase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changing it to AvailableElevations

packages/eds-core-react/src/components/Card/Card.tsx Outdated Show resolved Hide resolved
packages/eds-core-react/src/components/TopBar/TopBar.tsx Outdated Show resolved Hide resolved
return (
<ThemeProvider theme={token}>
<StyledTopBar {...props} ref={ref}>
<StyledTopBar elevation={elevation} {...rest}>
Copy link
Contributor

Choose a reason for hiding this comment

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

After changing this to use Paper it doesn't look like its a header element anymore. Maybe use the as prop to cast it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have now learned about forwardedAs since using as on an element also extended with styled(component) will not work

@@ -15,6 +15,9 @@ import {
export default {
title: 'Navigation/TopBar',
component: TopBar,
args: {
elevation: 'raised',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest removing this or set it to none as thats the default elevation for Topbar

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The example is a sticky topbar though, which is the use case where it should be elevated. Perhaps the main example should not be sticky and move that down as its own story?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eh, I just removed it

@oddvernes oddvernes requested a review from mimarz June 16, 2022 11:44
Copy link
Contributor

@mimarz mimarz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@oddvernes oddvernes merged commit 72dfac6 into develop Jun 17, 2022
@oddvernes oddvernes deleted the improvement/OOE-2230-missing-elevation branch June 17, 2022 11:33
hkfb pushed a commit to equinor/webviz-subsurface-components that referenced this pull request Feb 13, 2024
## [0.5.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@0.5.2) (2024-02-13)

### Bug Fixes

* bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
hkfb pushed a commit to equinor/webviz-subsurface-components that referenced this pull request Feb 13, 2024
## [1.2.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.2.2) (2024-02-13)

### Bug Fixes

* bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
hkfb pushed a commit to equinor/webviz-subsurface-components that referenced this pull request Feb 13, 2024
## [0.16.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@0.16.2) (2024-02-13)

### Bug Fixes

* bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
hkfb pushed a commit to equinor/webviz-subsurface-components that referenced this pull request Feb 13, 2024
## [1.1.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.1.2) (2024-02-13)

### Bug Fixes

* bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
hkfb pushed a commit to equinor/webviz-subsurface-components that referenced this pull request Feb 13, 2024
## [1.4.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.4.2) (2024-02-13)

### Bug Fixes

* bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
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.

Missing elevation on components
2 participants