Skip to content

Conversation

@Sergio-Mira
Copy link
Contributor

@Sergio-Mira Sergio-Mira commented Jan 22, 2026

What github issue is this PR for, if any?

Resolves #5377

What changed, and why?

Remove global span CSS and instead adds new CSS class for volunteer info in the Supervisors table where it was previously using status-btn (its not a button!).

It changes a bit the style in the Admin edit page (see screenshot) but I prefeer the status not taking the whole line but I can work on making sure that also looks the same as prod.

How is this tested? (please write rspec and jest tests!) 💖💪

Tested comparing main and this branch in all pages to check styles match.

Screenshots please :)

Screenshot 2026-01-22 at 12 34 52 Screenshot 2026-01-22 at 12 40 13 (note current status does no longer take the whole line)

Feelings gif (optional)

https://giphy.com/gifs/XIqCQx02E1U9W

@github-actions github-actions bot added javascript for use by Github Labeler to mark pull requests that update Javascript code erb labels Jan 22, 2026
@Sergio-Mira Sergio-Mira marked this pull request as ready for review January 22, 2026 11:47
@Sergio-Mira Sergio-Mira marked this pull request as draft January 22, 2026 12:23
@Sergio-Mira Sergio-Mira force-pushed the 5377-remove-global-span-css branch from 5766af5 to 9e8d598 Compare January 22, 2026 12:41
@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Jan 22, 2026
@Sergio-Mira Sergio-Mira marked this pull request as ready for review January 22, 2026 13:44
Copy link
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

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

lgtm! :)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a problematic global CSS rule that set all span elements to display: block, which was too broad and affected elements beyond its intended scope. The change introduces a new, properly scoped .supervisor-stat CSS class specifically for supervisor volunteer statistics.

Changes:

  • Removed global span { display: block; } CSS rule
  • Added new .supervisor-stat CSS class with appropriate styling
  • Updated supervisor views and JavaScript to use the new class instead of the generic status-btn
  • Fixed an unrelated bug by removing an extra closing </div> tag

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
public/assets/css/main.css Removed global span CSS rule and added new .supervisor-stat class with display, padding, border-radius, font-size, and font-weight properties
app/views/supervisors/index.html.erb Replaced status-btn with supervisor-stat class in legend and volunteer info displays
app/javascript/src/dashboard.js Updated class names to supervisor-stat and added helpful title attributes for accessibility
spec/system/supervisors/index_spec.rb Updated test selectors from .status-btn to .supervisor-stat to match new class names
app/views/casa_admins/index.html.erb Removed extra closing div tag to fix HTML structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@compwron compwron merged commit cd39246 into rubyforgood:main Jan 22, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

erb javascript for use by Github Labeler to mark pull requests that update Javascript code ruby Pull requests that update Ruby code Tests! 🎉💖👏

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the global <span> tag CSS

2 participants