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

The new o-header #1777

Merged
merged 11 commits into from
Aug 21, 2024
Merged

The new o-header #1777

merged 11 commits into from
Aug 21, 2024

Conversation

metart43
Copy link
Member

@metart43 metart43 commented Aug 14, 2024

Describe your changes

Please, follow my commit history while reviewing the PR.

FT header is undergoing designs changes as a part of the initiative to revamp search on ft.com.

Main changes:

  • search input field has a type="search" which is the semantically correct type. We are getting some built-in advantages of using type="search". It should have a positive effect on a11ty. More about it
  • search form and search button are bigger
  • search container overlays the rest of the nav menu and rest of the content
  • magnifying glass icon is shown on the tablet break-point
  • drawer search is hidden on the tablet break-point
  • close button is changed from x to close

Demo

Desktop

Screenshot 2024-08-14 at 12-10-13 components-o-header--header-primary

Tablet

image

Phone (375 width). This break-point is not meant to be used because you cannot toggle the search menu, but it's okay to still make it look acceptable

Screenshot 2024-08-14 at 12-11-00 components-o-header--header-primary

Phone (320 width). This break-point is not meant to be used because you cannot toggle the search menu, but it's okay to still make it look acceptable

Screenshot 2024-08-14 at 12-11-13 components-o-header--header-primary

Issue ticket number and link

https://financialtimes.atlassian.net/jira/software/c/projects/CON/boards/1061?selectedIssue=CON-3449

Link to Figma designs

https://www.figma.com/design/L6qyUFPPLRmf59OxTkz2VJ/Semantic-Search?node-id=10-2861&m=dev

Checklist before requesting a review

  • I have applied percy label for o-[COMPONENT] or chromatic label for o3-[COMPONENT] on my PR before merging and after review. Find more details in CONTRIBUTING.md
  • If it is a new feature, I have added thorough tests.
  • I have updated relevant docs.
  • I have updated relevant env variables in Doppler.

@metart43 metart43 changed the title Am/o header The new o-header Aug 14, 2024
@metart43 metart43 marked this pull request as ready for review August 14, 2024 14:35
@metart43 metart43 requested a review from a team as a code owner August 14, 2024 14:35
@notlee notlee temporarily deployed to origami-webs-am-o-heade-6obeq2 August 15, 2024 14:16 Inactive
@notlee notlee self-requested a review August 15, 2024 14:20
Copy link
Contributor

@notlee notlee left a comment

Choose a reason for hiding this comment

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

Hey,

I haven't had time to do a proper review but I can see this isn't quite ready for release yet. For example, markup changes are classed as a breaking change so we need to ensure this is a major release and has a migration guide.

As I'm off tomorrow I've written up a Jira Ticket to capture some things the Origami team should pay some closer attention to on review

@metart43
Copy link
Member Author

@notlee

  • The search bar can display at least twice, in the main nav and the sticky nav. Ensure they both work and the correct input/controls/labels are associated.

Search bar can be displayed three times. Drawer, sticky and main nav.

In production label and controls currently are not properly associated. See this commit for the reference. If you inspect the main input field and it's label you will spot they reference different IDs.

I can write up a migration guide, highlighting changes described in this PR. The main change related to the type="search" and introduction of a z-index. Everything else is trivial.

@metart43
Copy link
Member Author

@frshwtr
Copy link
Contributor

frshwtr commented Aug 19, 2024

It's quite hard to see but it seems the button is about 1px taller than the search bar, is that intentional?
image

@metart43
Copy link
Member Author

@frshwtr I am not sure if you are QAing the changes I've pushed. Th screenshot you've shared doesn't look right. I can see that the button on your screenshot looks different to what I have locally

Please, see the dimension of the search bar and the button was (42px):

Screenshot 2024-08-20 at 09 58 24 Screenshot 2024-08-20 at 09 58 14

I have pushed a commit to reduce the icon height, the bar height should be 40 034a682

@notlee notlee temporarily deployed to origami-webs-am-o-heade-unzodr August 20, 2024 09:08 Inactive
@notlee notlee had a problem deploying to origami-webs-am-o-heade-unzodr August 20, 2024 09:08 Failure
@metart43
Copy link
Member Author

@notlee thanks for advising to write up a migration guide. I have pushed a commit to do so d533203

@@ -1,5 +1,23 @@
# Migration Guide

## Migrating from v13 to v14
Copy link
Contributor

Choose a reason for hiding this comment

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

This guide is useful in providing updates on the changes to TSX users. o-header also supports HTML and CSS users. Please could you add some details on how I would upgrade my code using this approach?

Migrating from v11 to v12 in this file has some examples of the things to mention. Mostly an example of the overall HTML to use (from the storybook link) and details on what individual sections can be removed/added/updated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this. I've addressed in a357342

@frshwtr
Copy link
Contributor

frshwtr commented Aug 21, 2024

@frshwtr I am not sure if you are QAing the changes I've pushed. Th screenshot you've shared doesn't look right. I can see that the button on your screenshot looks different to what I have locally

Please, see the dimension of the search bar and the button was (42px):

Screenshot 2024-08-20 at 09 58 24 Screenshot 2024-08-20 at 09 58 14
I have pushed a commit to reduce the icon height, the bar height should be 40 034a682

This looks good now, thanks.

@notlee notlee temporarily deployed to origami-webs-am-o-heade-unzodr August 21, 2024 11:19 Inactive
@notlee notlee temporarily deployed to origami-webs-am-o-heade-unzodr August 21, 2024 11:26 Inactive
@notlee notlee temporarily deployed to origami-webs-am-o-heade-unzodr August 21, 2024 11:37 Inactive
@frshwtr frshwtr changed the base branch from main to o-header-staging August 21, 2024 14:23
@notlee notlee temporarily deployed to origami-webs-am-o-heade-unzodr August 21, 2024 14:59 Inactive
@metart43 metart43 merged commit 4a216ec into o-header-staging Aug 21, 2024
3 checks passed
@metart43 metart43 deleted the am/o-header branch August 21, 2024 15:06
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