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

Improv/mobile responsive report #261

Merged
merged 54 commits into from
Jan 22, 2024
Merged

Conversation

CKodes
Copy link
Contributor

@CKodes CKodes commented Jan 18, 2024

This PR is a WIP and adds...

Mobile Responsive UI

  1. Core layout changes to desktop UI to support mobile responsive UI
  • static/ejs/partials/main.ejs will add new
    element to contain wcag compliance + top 5 summary
  • static/ejs/partials/components/wcagCompliance.ejs layout changes with new css
  • static/ejs/partials/scripts/categorySummary.ejs will replace function const ruleItem = createElementFromString to fix UI on both desktop and mobile view
  1. New media queries and css declarations for mobile UI
  • static/ejs/partials/styles/styles.ejs will have new css declarations under Mobile UI Styles

Search Feature

  1. New scripts to support search feature
  • static/ejs/partials/components/reportSearch.ejs
  • static/ejs/partials/scripts/reportSearch.ejs
  1. Updates to the following to support search feature tagged with comments search feat changes
  • static/ejs/partials/components/ruleOffcanvas.ejs
  • static/ejs/partials/scripts/ruleOffcanvas.ejs
  • static/ejs/partials/scripts/categorySummary.ejs
  • static/ejs/partials/main.ejs
  • static/ejs/report.ejs

Pending FIX

  • Elipsis not showing for rule-item-description

  • CSS for search function to be ported to static/ejs/partials/styles/styles.ejs

  • CSS for search function affecting mobile responsive when searchFilter is toggled on

  • I've kept this PR as small as possible (~500 lines) by splitting it into PRs with manageable chunks of code

  • I've requested reviews from 1 reviewer

This PR is a WIP so the following will be done later

  • I've tested existing features (website scan, sitemap, custom flow) in both node index and cli
  • I've synced this fork with GovTechSG repo
  • I've added/updated unit tests
  • I've added/updated any necessary dependencies in package[-lock].json npm audit, portable installation on GitHub Actions

This code will:

Add a script that will check for the viewport and update the report's #headerTitle accordingly.

Add id headerTitle to <header> h1 tag.

Add checkViewportWidth to report.ejs
BREAKING CHANGE

This commit will:

- Move scanAbout component outside of main tag.

- Remove inline css flex-column from main tag.

- Nest scan content divs under a new section.

- Add media queries for max-width 600px
This commit will fix the error caused by declaring the target id (i.e. #headerTitle) before the script is called.
This commit adds:

- Display none to elements not needed on ui (ie ally-online-banner)

- Remove class z-1 to #scanAbout.
This commit will update css declaration for selectors related to #scan-about and #header.
This commit removes the inline bootstrap css and move the declarations into .compliance-summary so that certain selectors can be targeted in the mobile view media query.
This commit adds elements for mobile ui and updates the necessary inline css for desktop and mobile views.
This commit updates the css declarations for desktop and mobile views.
For commits up till b50e4eb
This commit will add the mobile ui for category selector and will add a desktop-view class to <nav> for desktop ui components.
This commit will fix the distortion of the divs under rule-item in the mobile view.
This commit will fix the report layout on ultrawide screens, the report will now stretch fully instead of having a right-side space.
This commit will fix the report layout on ultrawide screens, the report will now stretch fully instead of having a right-side space.
…ines

This commit will fix the text wrapping distortion for createElementFromString.

Core changes:

- <button> element will have three <div> to each contain rule-items-count, rule-item-description, and dropdown svg icon.

- Add dedicated css styles for rule-item-description to also make it mobile responsive.
@CKodes CKodes added the enhancement New feature or request label Jan 18, 2024
@CKodes CKodes requested a review from younglim January 18, 2024 09:32
CKodes and others added 16 commits January 18, 2024 18:03
This commit will add the onclick that calls OffCanvasSearchWarning for the search feature.
This commit changes the breakpoint to 767 to follow bootstrap values.
This commit will:

- Remove unnecessary attributes and classes from header tag.

- Add css styles to header tag
This commit will change the layout for wcagCompliance card and top5 card:

- New class for card containers on <main>

- Layout changes on wcagCompliance ejs file

- New css styles for wcagCompliance card
@joshualai9922
Copy link
Contributor

Merged with fix/search-filter-ui branch. Fixed search filter ui for mobile responsiveness.

Copy link
Collaborator

@younglim younglim left a comment

Choose a reason for hiding this comment

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

LGTM

@younglim younglim merged commit d32771e into master Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants