osmapp icon indicating copy to clipboard operation
osmapp copied to clipboard

SearchBox: Tailwind Conversion

Open Flohhhhh opened this issue 2 years ago • 5 comments

SearchBox conversion begun!

It's up and running with Tailwind and Headless, but could probably use some more re-factoring. Main file for review

Some notes:

  • Kept the styling very minimal so we can iterate on it later instead of worrying about it too much during conversion.
  • Some of the styling classes are quite long, this is something that rarely occurs, but in this case was harder to avoid because I wasn't building the component from scratch.
  • ~~I broke distance somehow 😢~~
  • I found a solution for scroll bars, it seems pretty good.
  • ~~FeaturePanel is broken, I know why, will be fast fix once we convert it.~~
  • Styling is broken in random old components due to Tailwind resets overriding old styles.
  • renderOptionFactory.tsx > SearchChoice.tsx
  • ~~Not sure why I removed the loading component, will add back later.~~

Preview image image

Flohhhhh avatar Jun 18 '23 05:06 Flohhhhh

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

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Jun 27, 2023 0:24am

vercel[bot] avatar Jun 18 '23 05:06 vercel[bot]

Future Improvements

  • Could make the search suggestions disappear when interacting with map and make suggestions appear when they are hidden and user clicks on search box. (Similar to MUI behavior) This is not necessarily needed, we could decide later. It should be pretty easy for someone else, I can't seem to understand what they mean here
  • Need to see if we can get the scrollbar to sit inside the parent div instead of extend it (tough because of current structure of floating panels, would need to rework it) (panel needs a set height in order to contain a scrollbox) This will be much easier to revisit at a later time once more of the app is converted.

Flohhhhh avatar Jun 18 '23 14:06 Flohhhhh

  • Did a quick fix for old components being broken
  • Fixed distance calculation and added to UI
  • Fixed map background so it matches user preference for ligh/dark mode

Flohhhhh avatar Jun 22 '23 01:06 Flohhhhh

Not sure if you already noticed, because it just happens until you hide the "welcome bar" - but the search results are hidden behind it.

image

amenk avatar Jul 23 '23 13:07 amenk

Thenks. We communicated in DMs. Currently this PR is waiting for my review. And I am terribly unable to finish it. Thanks for you message though, it is another nudge to do it. I am betting on wednesday ;)

zbycz avatar Jul 23 '23 20:07 zbycz