nusmodifications / nusmodifications/nusmods

Modal-triggered page layout bugs

Open
#834 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
689
Forks
364
Avg merge
7h 5m
Merged PRs (30d)
14

Description

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

2 (possibly unrelated) bugs caused by modals:

  1. The module search box and filter list is laid out wrongly when a modal is open. This might be caused by the no-scroll class set on body.
  2. The page content behind the modal is cut off when the viewport height > 50rem and the page is scrolled down. As the body height is set to the viewport height, this overflow: hidden line hides all content below a certain point.

If the current behavior is a bug, please provide the steps to reproduce. If possible, please upload a screenshot or link to a video recording (on macOS you can use QuickTime) demonstrating the problem.

  1. Wrong layout bug

    1. Navigate to https://nusmods.com/modules?q=yakuza.
    2. Ensure that the viewport width >= 768px.
    3. Click the "Feedback Welcome!" button in the footer.
    4. Observe that the search box is in the wrong position, and the filter list has disappeared.
      nusmods com_settings
  2. Page content cut off bug

    1. Navigate to https://nusmods.com/settings or https://nusmods.com/modules?q=yakuza.
    2. Ensure that the viewport height >= 50rem.
    3. Scroll down (you must scroll down, otherwise nothing will be cut off).
    4. Click the "Feedback Welcome!" button in the footer.
    5. Observe that the page content is cut off.
      nusmods com_timetable_sem-2 1

What is the expected behavior?

The content behind the modal should not change when the modal is displayed, apart from disabling page scrolling.

Further information

  • Which version of NUSMods are you currently using? 20180129-9fd1116
  • Which browser and version are you using? Chrome on Linux 64.0.3282.140, Safari on iOS 11.2.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with www/src/styles/layout/site.scss at line 5 and www/src/js/views/components/Modal.scss at line 11, then reproduce both modal cases on the listed settings or modules URLs. Done means the underlying layout and content remain unchanged when the feedback modal opens, with only page scrolling disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, scss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.