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

[DO NOTE MERGE] Zebra stripes by election and hide dropdown option #6597

Closed

Conversation

johnnyporkchops
Copy link
Contributor

@johnnyporkchops johnnyporkchops commented Dec 12, 2024

Summary (required)

NOTE: To avoid conflicts, please merge this related PR first: #6512

  • Resolves Zebra Stripes in Reporting Dates Table Template Not Operating without Supporting Code #6583
  • Give editors of ReportngDatesTable template more granular comtrol over Zebra striping by enabling the ability to add custom classes to rows in the table block.
    • Specifically for pages where the editor wants to manually stripe by election-name instead of the default -- by state.
  • A new checkbox to to hide the states dropdown on the template instead of having to add CSS the template in an HTML block.

Required reviewers

one dev and @djgarr - ( I can push to feature when you are ready)

Impacted areas of the application

zebra striping options ReportingDatesTable templates
States dropdown on ReportingDatesTable templates

How to test

I can push to feature when you are ready to test @djgarr

  • npm run build-js
  • Open an existing or create a new page using Reporting dates table template
  • Edit a cell in the State column to wrap the election name in a custom <election> html tag, like:
    • Example:<election class="fl1">Florida 1st Congressional District Special Primary</election>
  • Preview or publish the page to confirm that the class was added to that row:
    • Example result in browser: <tr class="fl1 fl">
  • Test that footnotes still work for these cells to by putting "~1" at the very end of the content in that cell
  • Test linked election names by wrapping the <election>tag in an <a> link tag
    • Example: <a href="https://www.fec.gov/help-candidates-and-committees/dates-and-deadlines/2024-reporting-dates/prior-notices-2024/election-report-notice-florida/"><election class="fl1">Florida 1st Congressional District Special Primary</election></a>

System architecture updates (if applicable)

(If this pull request changes our current system diagram, include a description of those changes here and create a new ticket to update the system diagram)

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.91%. Comparing base (8a7a79d) to head (25784e6).
Report is 24 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6597   +/-   ##
========================================
  Coverage    79.91%   79.91%           
========================================
  Files          235      235           
  Lines         5147     5148    +1     
========================================
+ Hits          4113     4114    +1     
  Misses        1034     1034           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnnyporkchops johnnyporkchops marked this pull request as ready for review December 20, 2024 14:40
@johnnyporkchops johnnyporkchops added this to the 27.1 milestone Dec 20, 2024
@rfultz rfultz modified the milestones: 27.1, 27.2 Dec 23, 2024
@johnnyporkchops johnnyporkchops changed the title Zebra stripes by election and hide dropdown option [PLS MERGE 6512 FIRST] Zebra stripes by election and hide dropdown option Jan 4, 2025
@rfultz rfultz modified the milestones: 27.2, 27.3 Jan 7, 2025
Comment on lines +1432 to +1434
FieldPanel('reporting_dates_table', help_text='Zebra striping Tip: To add additional row classes for more granular cotrol over zebra stripes, wrap \
the election name text in first column/first cell with an <election> html tag. \
Example (includiing footnote tilda ): <election class="fl1">Florida 1st Congressional District Special Primary</election> ~*'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Being help text, can we lowercase 'Tip', remove an i from includiing, add an 'n' in 'cotrol', and change tilda ) to tilde). As a nice touch, I'd like to monospace the code in help_text but it doesn't seem like Wagtail supports that. Yet?

I'd want to verify with Content that the help text addresses questions they may have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rfultz I definitely see how this might seem like overkill. But this template is only used by one team member now and becomes increasingly esoteric with each iteration. So I want to be explicit about this non-intuitive functionality for the current user and the eventual new user, someday.

mql.addListener(this.mediaQueryResponse); // TODO: .addListener() has been deprecated
// See: https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@johnnyporkchops johnnyporkchops changed the title [PLS MERGE 6512 FIRST] Zebra stripes by election and hide dropdown option [DO NOTE MERGE] Zebra stripes by election and hide dropdown option Jan 8, 2025
@johnnyporkchops
Copy link
Contributor Author

Closing in favor of PR to release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Zebra Stripes in Reporting Dates Table Template Not Operating without Supporting Code
2 participants