OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

front: avoid x scroll on map search #7899

Closed sim51 closed 1 day ago

sim51 commented 3 days ago

Fix #7185

Using flex with grow/shrink instead of width 100% and specify x-overflow hidden (even if now the case should not be possible). Now it works on both firefox & chrome

codecov-commenter commented 3 days ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 28.53%. Comparing base (7353c7a) to head (99d9ad4).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7899 +/- ## ============================================ - Coverage 28.54% 28.53% -0.02% Complexity 2059 2059 ============================================ Files 1249 1249 Lines 154182 154182 Branches 3036 3036 ============================================ - Hits 44009 43989 -20 - Misses 108363 108383 +20 Partials 1810 1810 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.95% <ø> (ø)` | | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.61% <ø> (-0.07%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `10.00% <ø> (ø)` | | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.34% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `72.93% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sim51 commented 1 day ago

Have you tested on chrome ? The initial bug is only visible on chrome not firefox.

To avoid scroll and use the full size of a div, I generally use flex, grow & shrink pattern. It works fine even in responsive.

SharglutDev commented 1 day ago

Yes even on chrome, it works without the grow/shrink/width:100%. But if you think it's gonna be more resilient with these properties, its fine by me.