Skip to content

Establish UI/UX parity and design consistency across views - #253

Merged
danielplohmann merged 9 commits into
masterfrom
fix/ui-ux-parity-consistency
Oct 29, 2026
Merged

danielplohmann merged 9 commits into
masterfrom
fix/ui-ux-parity-consistency

Conversation

@r0ny123

@r0ny123 r0ny123 commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Grew out of the same Lighthouse pass as #244, but is about parity, consistency and broken controls rather than the audits themselves. #244 is merged now (batch C1); where both changed the same element, master's form is kept, as listed under "Merge with batch C" below.

Consistency and parity

  • All deprecated <center> tags replaced with Bootstrap 5 flex/alignment; thead-light migrated to table-light across every view (the old class stays as a CSS alias).
  • Filter and form controls normalized: consistent button labels ("Filter"/"Clear"/"Confirm Change"), casing and spacing across result pages, admin pages, login/register.
  • The compare drill-down pages (all/family/sample/function) share a new compare_breadcrumb component instead of ad-hoc headings.
  • Legacy Flaskr-tutorial overrides dropped from style.css (rigid min-width: 900px on body, html padding, half-width forms), nav-pill and accordion overrides surrendered to Bootstrap defaults.
  • Result-page JS builds its URLs with url_for instead of hardcoded /data/result/… paths.

Broken controls fixed

  • The column-settings save/reset forms sent no CSRF token; both now do.
  • Duplicate element ids (dropdown-menu in every sample row, sample_…_edit on family rows), unclosed <i> tags inside <th>, a premature </tr> on the result page, a { % typo that left a column default unset, a stray </td> in the job column table, and the admins-tab delete button targeting a nonexistent tab='admin'.
  • The analyze dropdowns worked through a malformed bs-toggle attribute plus hand-rolled jQuery toggling; they are real Bootstrap dropdowns now, and the row-click navigation skips clicks inside the buttons cell.
  • analyze.compare_submit_query rendered an empty stub page; it redirects to analyze.query and the template is gone.
  • The clipboard button gets a 24px touch target via the new .btn-clipboard class.

Guardrails: tests/testUiParity.py fails on <center>, thead-light, orphaned for="block_count", unclosed <i> inside <th>, the min-width: 900px, and :( emoticons.

Verified at the time: python -m pytest 1265 passed / 7 skipped, ruff check . clean, and the edited templates compile. The live checks are below.

Merge with batch C (2deab96). Master (6564602, #298 and #299) is merged in; 23 templates and stylesheets conflicted. Master's changes are kept and this branch's are applied on top:

  • Headings: Fix the accessibility and SEO audits Lighthouse fails across the app (#243) #244's h2/h3 outline is kept; the delete-job modal title is <h2 class="modal-title h5"> (mcritweb/templates/jobs.html:230).
  • Job titles: master's job_name filter replaces job_info.parameters in the link hunt, maintenance and function result headings (linkhunt.html:14, result_maintenance.html:9, result_compare_function.html:16), with this branch's breadcrumb kept on the function page.
  • Empty states: master's empty_state macro replaces this branch's inline messages. The macro itself now uses a centred div instead of <center> (mcritweb/templates/table/table.html:22), as does the job search's no-match line (jobs.html:213), so testUiParity.py keeps holding.
  • Cross compare: master renders one method's matrix and fills the other tabs on click. Its tab loop shows this branch's labels ("Score Weighted" rather than score_weighted), looked up by method name (result_cross.html:224). The pane body is a div instead of <center>, and the script that fills it finds it by class (result_cross.html:304).
  • Admin page: the maintenance forms keep master's confirm-before-submit handler and this branch's spacing classes.
  • Job errors: master's pre.job-error replaces the wrapper div.
  • Row buttons: this branch's per-item aria-labels stay, with master's titles added where this branch had none.
  • YARA copy: the button stays and calls master's copyTextAreaToClipboard. testResultPages.py's check for that handler accepts a button as well as an <i>; a click on the icon bubbles to the button.
  • Page description: Fix the accessibility and SEO audits Lighthouse fails across the app (#243) #244's {% block description %} meta is kept and this branch's static description is gone (mcritweb/templates/base.html:9 is the one left). The merge had kept both, so every page carried two; 137b0b5 removes the second, and tests/testAccessibility.py now reports a page with more than one.

9829e95 drops two trailing spaces in CSS lines this branch touched, a third blank line in testUiParity.py, and an entry for a local tool directory this branch had added to .gitignore, which master does not list.

With master merged, two of testUiParity.py's tests pass on master's code too, because #244 made the same fixes: test_base_html_accessibility_and_semantics and test_no_mismatched_block_count_label. They stay as guards. Full suite with Chromium on 2deab96: 2087 passed, 11 skipped; ruff check . clean.

137b0b5 removes the second page description described above. Full suite with Chromium on 137b0b5: 2087 passed, 11 skipped; ruff check . clean.

f5bab66: two regressions this branch caused, found by Lighthouse. A run against master (6564602) showed two things this branch got worse:

  • The filter forms' checkboxes. Dropping the tutorial's .content rules also dropped the 1em gap under every field of the result pages' filter forms. At desktop width their checkboxes are under 24px tall and sat flush against the field above and the Filter button below, so target-size failed the 1vN result at 1350px: accessibility 96, against master's 100. form.form-inline input gets the gap back (mcritweb/static/style.css:212). Every control in those forms now has master's computed bottom margin, and the 1vN result scores 100 at desktop width again.
  • The Analyze buttons' names. The sample Analyze buttons carried an aria-label that left out the job count they show (label-content-name-mismatch, WCAG 2.5.3). They are now named by their content: the count, visually hidden words, and an icon hidden from assistive technology (table/sample_row.html:141, single_sample.html:111). In the accessibility tree a row's button reads "Analyze sample , matching jobs: ", and the buttons look as before.

tests/testAccessibility.py's page check now fails on an aria-label that leaves out a word the control shows. tests/testFilterFormTargetsBrowser.py measures WCAG 2.5.8's spacing in Chromium on the nine filter forms of five result pages and link hunt, at Lighthouse's desktop width. Both fail on 137b0b5 and pass on master and on f5bab66. Removing the margin rule, or putting the aria-label back, fails them again.

On mobile, without master's 900px minimum width the result tables are as wide as the screen and wrap more, so target-size also fails on a family's matches (?famid=), where master passes. Those are the id and family cells, which #302 keeps on one line. On a local build with both PRs, mobile accessibility is 100 on the 1vN result and its ?famid=, ?samid= and ?funid= views, the 1v1 result and link hunt. Link hunt is about twice master's height at 768px and below, for the same reason.

Full suite with Chromium on f5bab66: 2099 passed, none skipped; ruff check . clean.

Live check. On the testbed (mcrit 1.13.0), master (6564602) and this branch as side instances against the live backend, GET only. Headless Chromium over two pages of every route kind, 48 pages each: the same status, script errors, console messages and failed requests on both. Driving the controls:

master this branch
family row: click the edit icon dialog opens, page stays dialog opens, page stays
family row: click a cell opens the family opens the family
sample row: click Analyze no menu (the malformed bs-toggle) menu opens, page stays
cross compare 6ab3e95a3b24190e88fedbc0: second tab 20 rows 20 rows, tabs labelled "Unweighted", "Score Weighted", ...
unique blocks 6abcb034595a8fbde663082f: copy an edited YARA rule clipboard holds the edit clipboard holds the edit

No script errors on either. check_corpus.py: as in the snapshot.

Relation to open PRs. A trial merge (git merge-tree) with each open PR head:

…views

Comprehensive audit and normalization of the user-facing interface:

- Clean global stylesheet constraints in style.css (remove rigid min-width: 900px, html padding override, and restrictive form sizing), navbar.css, and signin.css.
- Semantic HTML landmarks and accessibility enhancements in base.html (<html lang="en">, <main class="content">, explicit logo dimensions for CLS prevention, aria-labels).
- Replace all deprecated <center> tags repo-wide with Bootstrap 5 flexbox/alignment.
- Migrate table headers across all views to standard Bootstrap 5 table-light.
- Standardize compare drill-down navigation with a shared compare_breadcrumb component.
- Fix broken controls: attach CSRF token to column settings AJAX/reset, fix duplicate IDs, properly close <i> icon tags in <th>, and fix orphaned for="block_count" label references.
- Redirect unfinished analyze.compare_submit_query route to analyze.query.
- Add automated regression guardrails in tests/testUiParity.py.
- Delete the now-unreachable compare_submit_query.html stub: the route
  renders a redirect to analyze.query since the previous commit.
- Apply .btn-clipboard to the clipboard button macro (a 24px touch
  target instead of the inline 20px style) and drop the unused
  .mcrit-dropzone rule from style.css.
- Give sortable column headers a keyboard handler to match the
  role="button" tabindex="0" they now carry.
- Add a meta description to base.html, closing the meta-description
  audit on #243; color-contrast in score-tinted rows and one-digit
  target sizes remain open there.
- Document deliberate changes the previous message omitted: the "View
  profile" dropdown items in the admin user lists linked to cross
  compare and no profile page exists, so they were removed; the
  nav-pill and accordion overrides in style.css were dropped in favour
  of Bootstrap defaults; .gitignore additionally covers .claude/ like
  CLAUDE.md.
@r0ny123
r0ny123 force-pushed the fix/ui-ux-parity-consistency branch from f22bd65 to 67710e0 Compare October 2, 2026 13:31
@r0ny123
r0ny123 added this pull request to stack #255 October 2, 2026 13:33
@r0ny123 r0ny123 changed the title Establish UI/UX parity, design consistency, and accessibility across views (#243) Establish UI/UX parity and design consistency across views Oct 2, 2026
The row handler told a button click from a row click by event.target.id,
which only worked while style.css had `a > * { pointer-events: none; }`.
With that rule gone, a click on the edit pencil lands on the <i> icon, so
the row navigated to the family page instead of opening the edit dialog,
and the Malpedia icon opened its tab and also navigated the current one.

Skip any click inside a link or button, as the sample rows now do, and
drop the leftover console.log.
@r0ny123

r0ny123 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

Ran this against the live testbed (mcrit 1.13.0, 66 samples, 436 jobs), side by side with master 1cdc195. One regression turned up, fixed in 0d170cb; everything else the description claims holds.

Regression (fixed). Dropping a > * { pointer-events: none; } from style.css broke the family-row click handler, which told a button from the row by event.target.id. Clicking the edit pencil landed on the <i> and opened /explore/families/<id> instead of the edit dialog, and the Malpedia icon opened its tab and navigated the current one. 0d170cb makes the handler skip any click inside a link or button, the same way sample_row.html now does, and adds a guard to testUiParity.py.

Crawl and browser sweep.

master this PR
1,849 pages 1,698 × 200, 149 × 302, 2 × 405 identical
48 page kinds in Chromium no JS errors no JS errors

The fixes, clicked through in a browser.

master this PR
column settings save / reset 400 (no CSRF token) saved, success message
analyze dropdown on sample rows duplicate #dropdown-menu, Escape does nothing proper Bootstrap dropdown, one open at a time, Escape closes
/analyze/compare_submit_query empty page redirects to /analyze/query
1vN result breadcrumbs none All Matches › Family › Sample, links work
delete from the Admins tab redirects to tab='admin', which no tab matches posts /delete_user/<id>/admins, lands back on Admins
family edit / Malpedia icons work work (after 0d170cb)
home page at 390px wide desktop layout shrunk readable; wide tables still scroll sideways

Also seen: logged-out pages no longer load the upload dialog (base.html), which the description doesn't mention.

Tests 1265 passed / 7 skipped, ruff clean, CI green on 0d170cb.

single_query_sample.html: master stopped printing "None" for a sample
without a timestamp; this branch replaced the row's valign attributes with
align-middle and closed the header cell with </th> instead of </td>. Kept
both.

testSampleTimestamp.py located that row by "Timestamp</td>", the
mismatched closing tag; it now accepts </th> as well, since what it tests
is the cell's value.
@r0ny123

r0ny123 commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

@danielplohmann the red CI here is not this PR's: please merge #297 first.

On the current head (bf77b9b, master 1.6.0 merged in), the unit tests fail on Python 3.12, 3.13 and 3.14 with the same 8 tests, all in tests/testSubmitMetadata.py, each a ConnectionError for backend.invalid; the rest of the suite passes. CI installed mcrit 1.16.0, released on 16 October, whose McritClient opens its session from _McritSession, a requests.Session subclass that the stub in that test file does not replace. So the tests try to reach the fake backend for real. Master's last green run was before that release and will fail the same way on its next run.

#297 fixes the stub for both 1.15 and 1.16. Once it is on master and merged in here, this PR needs no change for it.

Conflicts in 23 templates and stylesheets, where batch C (#298, #299)
changed the same lines as this branch. Master's changes are kept and this
branch's are applied on top:

- Headings: #244's h2/h3 outline wins over this branch's restyled
  headings; the delete-job modal title is <h2 class="modal-title h5">.
- Job titles: master's job_name filter replaces job_info.parameters in
  the link hunt, maintenance and function result headings, keeping the
  breadcrumb this branch added.
- Empty states: master's empty_state macro replaces this branch's inline
  messages; the macro itself now uses a centred div instead of <center>,
  and so does the job search's no-match line.
- Cross compare: master renders one method's matrix and fills the other
  tabs on click. Its tab loop now shows this branch's labels, looked up
  by method name; the pane body is a div instead of <center>, and the
  script finds it by class.
- Admin page: the maintenance forms keep master's confirm-before-submit
  handler and this branch's spacing classes.
- Job errors: master's pre.job-error replaces the wrapper div.
- Row buttons: this branch's per-item aria-labels stay, with master's
  titles added where this branch had none.
- YARA copy: the button stays and calls master's copyTextAreaToClipboard;
  testResultPages accepts a button carrying that handler, not only an <i>.
Two CSS lines this branch touched kept trailing spaces, testUiParity.py had
three blank lines between two tests, and .gitignore gained an entry for a
local tool directory that master does not list.
This branch put a static description into base.html's head, and #244
later gave master a {% block description %} for the same purpose. The
batch C merge kept both, so every page carried two descriptions and a
crawler could take either one. Master's block stays, since a page can
override it, and the static line goes.

testAccessibility's page check now reports more than one description,
which fails on all 35 rendered pages without this change.
Dropping the tutorial's .content rules also dropped the 1em gap under
every field of the result pages' filter forms. At desktop width their
checkboxes are under 24px tall and sat flush against the field above
and the Filter button below, so Lighthouse's target-size audit failed
the 1vN result there. form.form-inline gets the gap back.

The sample Analyze buttons carried an aria-label that left out the job
count they show (label-content-name-mismatch, WCAG 2.5.3). They are
named by their content now: the count, visually hidden words and an
icon hidden from assistive technology.

testAccessibility's page check now fails on an aria-label that leaves
out a word the control shows, and testFilterFormTargetsBrowser measures
the spacing WCAG 2.5.8 asks of the filter forms in Chromium.
style.css's `.content form` rule, which this branch drops, gave the zone half the
column, 608px on a desktop. In the flex column that replaces <center> a form is as
wide as its content instead, and the zone's content is Dropzone's message: 44px wide
until Dropzone had attached, 239px after, short of the 600px max-width. Lighthouse
counted the widening as a layout shift wherever Dropzone attached after the first
paint.

Both zones are width: 100% up to 600px now, the import page's too, whose margin: 10%
never applied (.content form set 1em).
r0ny123 added a commit that referenced this pull request Oct 25, 2026
The conflicts are the filter and server fields #253 relabelled: kept as they are here, with
their values quoted.
r0ny123 added a commit that referenced this pull request Oct 25, 2026
The conflict is the two new-password fields #253 labelled: kept as they are here, and required.
r0ny123 added a commit that referenced this pull request Oct 25, 2026
It aborted static/dropzone.js, which no page loads since #324 serves the minified build,
so both of its runs measured the zone with Dropzone in. It holds back that file now, and
checks, once the queue has run, that nothing filled the zone.
@danielplohmann
danielplohmann merged commit 161b833 into master Oct 29, 2026
8 checks passed
danielplohmann added a commit that referenced this pull request Oct 29, 2026
r0ny123 added a commit that referenced this pull request Oct 29, 2026
The tests that came with #253, #254, #293, #303 and #305 put only user_id in the session, which this branch ends on the next request, so the pages they opened were the login page. They sign in with log_in_as and session_cookie_for.
r0ny123 added a commit that referenced this pull request Oct 29, 2026
Master's templates (#253's layout pass, #254's token notices, #301's
Statistics page and others) use classes the cut did not keep, among them
.table-light, .breadcrumb, .btn-outline-secondary and -danger and a few
spacing utilities. scripts/subset_bootstrap.py adds their rules: 54,417
bytes now.
r0ny123 pushed a commit to r0ny123/mcritweb that referenced this pull request Oct 30, 2026
familiary#253 turned .right-logo from an absolutely positioned corner logo into a
flex item, which put it right next to the MCRIT logo instead of at the
right edge. Pin it top-right again, as on master, at familiary#253's 40px height.
The logo is only shown from 992px (d-lg-block), so narrower layouts are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HERmVhHo4ibp7HSTXr3Ya8
r0ny123 added a commit to r0ny123/mcritweb that referenced this pull request Oct 30, 2026
…and its tests

familiary#253, now on master, leaves the navbar transparent and the inactive pills,
the open accordion header and its focus ring to Bootstrap. The dark sheet
gets the pill, accordion and focus rules the light sheet no longer
carries, and the dark-theme tests read table-light and a navbar that
paints nothing of its own. familiary#253's testUiParity reads <html lang="en">
followed by data-theme, and the logos' sizes as themed_img() arguments.
@r0ny123
r0ny123 deleted the fix/ui-ux-parity-consistency branch October 30, 2026 06:04
r0ny123 added a commit that referenced this pull request Oct 30, 2026
#253 moved the FKIE logo out of the navbar's top-right corner from 992px
up, and every test and Lighthouse check passed: none of them compares where
things land. The Testing section now asks for screenshots of the pages a
change can affect, before and after, at 390, 820, 1280 and 1920px and in
both themes, each pair looked at; a difference is either the intended
change, named in the PR, or a regression pinned by a browser test such as
testNavbarLogosBrowser.py. A merge that resolves a template or stylesheet
conflict counts as a change.
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