Skip to content

fix(speakers): use dark fallback text color on social link hover (#312) - #367

Open
aakashtripathi011 wants to merge 1 commit into
fossasia:mainfrom
aakashtripathi011:fix/speaker-social-hover-312
Open

aakashtripathi011 wants to merge 1 commit into
fossasia:mainfrom
aakashtripathi011:fix/speaker-social-hover-312

Conversation

@aakashtripathi011

@aakashtripathi011 aakashtripathi011 commented Oct 22, 2026 •

Copy link
Copy Markdown

📌 Fixes

Partially addresses #312 (social link hover issue only; the event-name resolution part is not included).


📝 Summary of Changes

  • On the single speaker profile page, the .wpfa-social-link:hover text turned white because the color fallback was #fff, and the --event-primary background is not defined on that page, so the text became invisible on a white background.
  • Changed the color fallback in speakers.css from #fff to #243447 (the existing --event-ink colour in this file). The background rule is unchanged, so themes that define the variables look the same as before.

📷 Screenshots / Demo (if UI-related)

Before: Screenshot 2026-10-22 095939
After: Screenshot 2026-10-22 100419


✅ Checklist

  • I've tested my changes locally
  • I've added tests (if applicable)
  • I've updated documentation (if applicable)
  • My code follows the project's code style guidelines

Reviewer Notes

One-line CSS change. On my Windows setup npm run lint reports only CRLF line-ending (prettier/prettier) errors across existing files, none related to this change, so I didn't run the auto-fix to avoid touching unrelated files. I did not run phpcs/phpstan for this CSS-only change.

Summary by Sourcery

Bug Fixes:

  • Fix the social link hover text color on speaker pages so it remains readable when event color variables are unavailable.

Summary by CodeRabbit

  • Style
    • Updated the fallback text color for social links when hovered. The event’s preferred contrast color remains unchanged.

@sourcery-ai

sourcery-ai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This CSS-only fix changes the social-link hover text fallback from white to dark ink, preventing invisible text on standalone speaker pages where --event-primary is undefined while preserving themed behavior.

File-Level Changes

Change Details Files
Update the social-link hover text fallback to remain readable when event theme variables are unavailable.
  • Replace the white --event-primary-contrast fallback with the existing dark ink color #243447.
  • Leave the hover background and variable-based theme behavior unchanged.
public/css/templates/speakers.css

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c089cc8-fc50-4392-9477-886545fca004
📥 Commits

Reviewing files that changed from the base of the PR and between 11449ff and 96bafa4.

📒 Files selected for processing: 1
  • public/css/templates/speakers.css

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The .wpfa-social-link:hover fallback text color changed from white to #243447. The --event-primary-contrast override remains unchanged.

Changes: Speaker social-link hover color

Layer / File(s) Summary
Update hover text fallback
public/css/templates/speakers.css
The fallback hover text color changed from #fff to #243447. The --event-primary-contrast override is unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related issues

  • Issue 312 reports invisible social-link hover text on individual speaker profiles. This change updates the fallback color, but does not address the reported event-name problem.

Suggested reviewers: nimeshan

Merge Risk: ⚪ Minimal · up to 96baf

Speaker social-link hover text now uses a dark fallback when event colors are absent, while configured event colors retain their paired contrast value. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: using a dark fallback text color for speaker social-link hover states.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="public/css/templates/speakers.css" line_range="383" />
<code_context>
 .wpfaevent .wpfa-social-link:hover {
 	background: var(--event-primary);
-	color: var(--event-primary-contrast, #fff);
+	color: var(--event-primary-contrast, #243447);
 }

</code_context>
<issue_to_address>
**Dark text loses contrast on hover**

When a theme supplies a dark `--event-primary` on the speaker profile without supplying `--event-primary-contrast`, `.wpfa-social-link:hover` combines the dark fallback text with the independently supplied `--event-primary` background, so a dark primary color renders the link label with poor contrast.

Use a contrast color appropriate to the primary background, or scope the dark fallback to the case where the hover background is absent.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: public/css/templates/speakers.css:383


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

.wpfaevent .wpfa-social-link:hover {
background: var(--event-primary);
color: var(--event-primary-contrast, #fff);
color: var(--event-primary-contrast, #243447);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium · Dark text loses contrast on hover

When a theme supplies a dark --event-primary on the speaker profile without supplying --event-primary-contrast, .wpfa-social-link:hover combines the dark fallback text with the independently supplied --event-primary background, so a dark primary color renders the link label with poor contrast.

Use a contrast color appropriate to the primary background, or scope the dark fallback to the case where the hover background is absent.

Prompt for AI agents
In `public/css/templates/speakers.css` at line 383:

**Dark text loses contrast on hover**

When a theme supplies a dark `--event-primary` on the speaker profile without supplying `--event-primary-contrast`, `.wpfa-social-link:hover` combines the dark fallback text with the independently supplied `--event-primary` background, so a dark primary color renders the link label with poor contrast.

Use a contrast color appropriate to the primary background, or scope the dark fallback to the case where the hover background is absent.

@Ubayed-Bin-Sufian Ubayed-Bin-Sufian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please address sourcery-ai review. Also please check what happens with darker background.

@Ubayed-Bin-Sufian Ubayed-Bin-Sufian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@aakashtripathi011 Please update as suggested.

This branch has not been deployed

No deployments
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