Skip to content

Commit

Permalink
backstage: add the o-header migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
metart43 committed Aug 20, 2024
1 parent 8e8e092 commit 683265e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions components/o-header/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

## Migrating from v12 to v13

`o-header v14` includes important markup changes to the search bar. Please review the changelog carefully:

1. **Search Input Field Updates**:

- As of this writing, the search input field appears in three places:
1. `<drawer />` (o-header/src/tsx/drawer.tsx)
2. `<sticky />` (o-header/src/tsx/sticky.tsx)
3. `<search />` (o-header/src/tsx/search.tsx)
- All input tags have had their `type` attributes changed from `type="text"` to `type="search"`. This update benefits screen reader users and ensures the input field has the correct semantic type.
- This may be a breaking change if you are migrating to `v14`, especially if you use the `type` attribute to query the input field element. Please check that your selectors work as intended.

2. **UI Changes**:
- The `X` button has been replaced with a text button labeled `Close`.
- The wrapper containing the search bar now overlays the content underneath it.
- There are minor changes to the UI, such as adjustments to the form width and bar height, but these should not affect functionality.

## Migrating from v12 to v13

o-header v13 includes markup changes to the drawer. This updates the edition switcher; moves the close button to align with where the hamburger icon would be when closed; and updates the search bar both in the drawer and on desktop. To migrate:

1. Update your markup according to the [Storybook demo](https://o2-core.origami.ft.com/?path=/story/components-o-header--header-primary&globals=backgrounds:!undefined) or [use o-header's tsx template](https://github.com/Financial-Times/origami/tree/main/components/o-header/src/tsx).
Expand Down

0 comments on commit 683265e

Please sign in to comment.