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

DT-6691 Non-scrollable navigator bottom sheet #5251

Open
wants to merge 4 commits into
base: v3
Choose a base branch
from
Open

DT-6691 Non-scrollable navigator bottom sheet #5251

wants to merge 4 commits into from

Conversation

partisaani
Copy link
Contributor

Proposed Changes

  • Prevents the bottom sheet from being scrolled during Navigator journey
  • Replaces bit of a hacky padding solution with flexbox
  • Fixes minor issues in NaviBottom.js

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • This pull request does not have any merge conflicts
  • All existing tests pass in CI build

Review

  • Read and verify the code changes
  • Test the functionality by running the UI locally with all popular browsers available in your platform
    • Focus especially on the cases when a MobileView renders a bottom sheet
  • Check that the implementation matches the design, when such one is defined in a Jira issue
  • Merge the pull request

@partisaani partisaani self-assigned this Feb 5, 2025
const pathParts = match.location.pathname.split('/');
const pagePrefix = pathParts?.length > 1 ? pathParts[1] : undefined;

// pass these to map according to bottom sheet placement
const [bottomPadding, setBottomPadding] = useState(getMiddlePosition());

const onScroll = e => {
if (e.target.className === 'drawer-container') {
if (e.target.className === 'drawer-container' && e.target.scrollTop) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check prevents a weird initial onScroll run from setting the scrollTop as 0

Copy link
Member

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

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

Looks otherwise OK, but I found some regressions:

  • Offset for map controls has changed slightly. OpenStreetMap copyright notice and map measure line are often partially or totally hidden under bottom sheet
  • Go to itinerary detail view. Reload the page. Bottom sheet is minimized like in navi view (itinerary hidden) and map controls are rendered in the middle of the map

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.

2 participants