mitre-attack / mitre-attack/attack-website

Collapsible Left Sidebar Improvements

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

Nobody has claimed this yet.

Dominant language
HTML
Stars
588
Forks
174
Avg merge
13d 4h
Merged PRs (30d)
2

Description

Summary

Make the left sidebar on desktop both resizable (drag the separator) and collapsible to a compact icon-only column (maybe 60px) so the main content fluidly expands to fill the freed horizontal space.

The mobile overlay/top-collapsed behavior should remain unchanged as it already collapses the sidebar content at the top of each page.

Things to do
  • A visible toggle control collapses/expands the sidebar; toggle exposes aria-expanded and aria-controls.
  • When collapsed on desktop the sidebar reduces to a compact icon-only column (≈60px) and the main content immediately fills the freed width.
  • A resizer handle between sidebar and content allows horizontal drag resizing; enforce min/max width (e.g., 200px–520px) and persist the last width. This is already partially completed, but does not have min/max width set anywhere yet.
  • Persist collapsed state and last width across page navigations (suggested localStorage keys: "sidebarCollapsed" and "sidebarWidth").
Files to review / reference:
  • Template: attack-theme/templates/general/sidebar-template.html
  • Layout template: attack-theme/templates/general/two-column.html
  • Stylesheet: attack-theme/static/style-attack.css (built from SCSS files in attack-style/ project)
  • Existing resizer script reference: /theme/scripts/resizer.js (as used in attack-theme/templates/general/two-column.html)
  • Suggested new script: /theme/scripts/sidebar.js

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

Review attack-theme/templates/general/sidebar-template.html and two-column.html, then inspect attack-theme/static/style-attack.css, the attack-style/SCSS sources, and /theme/scripts/resizer.js. Use the suggested /theme/scripts/sidebar.js entry point for the toggle, resizing, and persistence behavior. Done means desktop resizing and collapse work with bounded widths, ARIA state is exposed, layout space is reclaimed, and mobile behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript
Domain
accessibility, frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.