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

feat(explorer): add search bar in order view #5118

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

tienshaoku
Copy link
Contributor

@tienshaoku tienshaoku commented Nov 21, 2024

Summary

Adding a search bar in order view s.t. users don't have to go back to homepage to look up other orders!
I used max-width: 60rem, padding: 1.6rem & styled component for consistency with this repo's convention and compatibility.

  • Full-screen view
    image
  • Mobile view
    image
  • When order id doesn't exist
    image

To Test

  1. UI components are responsive in different views
  • In any view, the search bar should have paddings on all sides
  • In narrower views, the search bar will become shorter but eventually the width stops shortening
  1. The search bar can work/search
  • Insert diff order ids and hit enter should be directed to diff order views
  1. The search bar won't show up when there's already a search bar at Search not found page
  • Insert invalid order id to make sure there's no a second search bar

Copy link

vercel bot commented Nov 21, 2024

@tienshaoku is attempting to deploy a commit to the cow Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Nov 21, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@tienshaoku
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
explorer-dev ✅ Ready (Inspect) Visit Preview Nov 24, 2024 4:37pm

@elena-zh
Copy link
Contributor

Hey @tienshaoku , lots of thanks for your valuable contribution!
The feature works great!

But now I'm thinking that we should have the same field on a user details page: (https://explorer.cow.fi/address/...)
user details
and a TX details page
search tx details
So a user can run search from any place in the app. WDYT about it? :)

@tienshaoku
Copy link
Contributor Author

@elena-zh thank you for the catch! I used only the order view page so was totally unaware of those two views 😆
If there're more places to be added, lmk!

  1. User view
  • full screen
    image
  • medium screen
    image
  1. Transaction view
  • full screen
    image
  • medium screen
    image

@elena-zh
Copy link
Contributor

Hey @tienshaoku , awesome! Thank you!

I have a tiny nitpick to report: in a mobile view (real device iPhone 13 mini with 17.6.1 OS) the search bar does not have right padding (on every page):
image

image

Could you please fix this?

Thanks!

@tienshaoku
Copy link
Contributor Author

@elena-zh not a problem at all!

image

It'll still be cut if the width is < ~280 (px i guess?)
So i think it's okay since this value is lower than all mobile options on the browser's developer console.
lmk if this is good! it's been a while since I worked on FE so thank you for the patience 😁

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

@tienshaoku , great job, thank you!

@shoom3301 shoom3301 merged commit d708dcf into cowprotocol:develop Nov 27, 2024
7 of 12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2024
Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants