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

[LOOM-1302] - Update BpkNavigationBarButtonLink and Icon #3361

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Conversation

metalix2
Copy link
Contributor

@metalix2 metalix2 commented Apr 15, 2024

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [KOA-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Storybook examples created/updated
  • Type declaration (.d.ts) files updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

@metalix2 metalix2 added the patch Patch production bug label Apr 15, 2024
Copy link

github-actions bot commented Apr 15, 2024

Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.tsx) were updated, but type files weren't. Have you checked that no types have changed?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 9f70f50

Copy link

Visit https://backpack.github.io/storybook-prs/3361 to see this build running in a browser.

Copy link

Visit https://backpack.github.io/storybook-prs/3361 to see this build running in a browser.


import { BAR_STYLES, type BarStyle } from './BpkNavigationBar';

import STYLES from './BpkNavigationBarButtonLink.module.scss';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can rely on the Style for BpkButtonLink now. We don't need to replicate it here.

@@ -19,7 +19,7 @@
import type { ComponentType, MouseEvent, ReactNode } from 'react';

// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
import BpkIconButton from '../../bpk-component-close-button';
import BpkCloseButton from '../../bpk-component-close-button';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wrong name❓

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the expect-error still valid with this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the close-button has not been ported to typescript yet. So still needed.

</BpkButtonLink>
<span className={className}>
<BpkButtonLink
alternate={barStyle === BAR_STYLES.onDark}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than setting our own class names we can use the BpkButtonLink's alterernate prop that flips the style.

customIcon={icon}
// TODO: className to be removed
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
className={getClassName(
Copy link
Contributor

@Sybsw Sybsw Apr 15, 2024

Choose a reason for hiding this comment

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

Just to be clear, we're leaving this className and the comment for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the BpkCloseButton is out of scope for this ticket. Otherwise would have to update everything else that uses it.

Copy link

Visit https://backpack.github.io/storybook-prs/3361 to see this build running in a browser.

@metalix2 metalix2 merged commit 864039f into main Apr 15, 2024
9 checks passed
@metalix2 metalix2 deleted the LOOM-1302 branch April 15, 2024 16:19
KathyWang0208 pushed a commit that referenced this pull request May 27, 2024
* Update BpkNavigationBarButtonLink and Icon

* snapshots

---------

Co-authored-by: metalix2 <matthewr@skyscanner.net>
KathyWang0208 pushed a commit that referenced this pull request May 27, 2024
* Update BpkNavigationBarButtonLink and Icon

* snapshots

---------

Co-authored-by: metalix2 <matthewr@skyscanner.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch production bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants