Skip to content

FINERACT-2528: fix Whimsy footer checks and document local verification#56

Open
mansi75 wants to merge 8 commits intoapache:asf-sitefrom
mansi75:FINERACT-2528-whimsy-check-fix
Open

FINERACT-2528: fix Whimsy footer checks and document local verification#56
mansi75 wants to merge 8 commits intoapache:asf-sitefrom
mansi75:FINERACT-2528-whimsy-check-fix

Conversation

@mansi75
Copy link

@mansi75 mansi75 commented Mar 12, 2026

What

Fixes FINERACT-2528 in apache/fineract-site.

Changes

  • updated footer rendering to improve Whimsy-compatible ASF footer checks
  • added Privacy Policy in the legal footer block
  • documented how maintainers can build, serve, and verify the site locally

Testing

  • built the site locally with Docker
  • ran local check command
  • served the site locally and verified footer links and legal text
  • checked below links locally
    License
    Thanks
    Privacy
    Security
    Sponsorship

References

  • JIRA: FINERACT-2528

@meonkeys
Copy link
Contributor

Also, please PGP-sign your commits.

@mansi75
Copy link
Author

mansi75 commented Mar 12, 2026

@meonkeys I will sign the commits.

@mansi75 mansi75 force-pushed the FINERACT-2528-whimsy-check-fix branch from e86fb61 to a3fd8d2 Compare March 12, 2026 19:47
@meonkeys
Copy link
Contributor

meonkeys commented Mar 12, 2026

@mansi75 mansi75 force-pushed the FINERACT-2528-whimsy-check-fix branch from 387b407 to de57473 Compare March 13, 2026 03:25
mansi75 and others added 4 commits March 13, 2026 03:33
'sponsorship' => { url: nil, text: /^(sponsorship|sponsor|donate)$/i },
'privacy' => { url: nil, text: /^privacy$/i },
'events' => { url: /apache\.org\/events\/current-event/, text: nil },
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The goal of these checks is that, if they pass (locally and in CI), they'll pass on https://whimsy.apache.org/site/project/fineract as well.

License and Thanks checks at https://whimsy.apache.org/site/project/fineract are currently red, so that means we've got some issue in the content on the asf-site branch.

But when I run this script against code on this PR's branch, all checks are all GREEN. I don't see any changes to the content explaining why they should now be passing! Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Other ideas (take them or leave them, totally up to you):

  1. add a unit test. That'll help we need to maintain scripts/run_whimsy_checks.rb
  2. instead of, or in addition to scripts/run_whimsy_checks.rb, make a new workflow that runs curl https://whimsy.apache.org/public/site-scan.json | jq .fineract.errors once a day and logs errors & fails if any errors are found
  3. maybe pull more/all of lib/whimsy/sitestandards.rb into our repo? I'm skeptical the abbreviated CHECKS in scripts/run_whimsy_checks.rb are working

Finally, I'll just note how I'm confused that https://whimsy.apache.org/site/project/fineract shows red boxes (failed checks) but curl https://whimsy.apache.org/public/site-scan.json | jq .fineract.errors returns []. I asked for help about that in #whimsy on https://the-asf.slack.com. license and thanks in that JSON output are both null... are those what's represented by the red boxes at https://whimsy.apache.org/site/project/fineract?

Copy link
Contributor

@meonkeys meonkeys Mar 20, 2026

Choose a reason for hiding this comment

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

oh wait, there might be a bug/feature in Whimsy itself. 🤔

Maybe the first <span> in the <a> is a problem?

<!-- I added some whitespace for readability -->
<a class="ref-link waves-effect waves-light" href=https://www.apache.org/foundation/thanks.html target=_blank rel=noopener>
  <span class="material-icons icon-sr-only" aria-hidden=true>favorite</span>
  <span>Thanks</span>
</a>

Maybe the whimsy checks started failing after I merged #46 ...

Anyway, thank you again for working on this. This is exactly why I want something we can run on our own to try to know when our checks are failing before they fail on https://whimsy.apache.org/site/project/fineract!

Copy link
Author

@mansi75 mansi75 Mar 20, 2026

Choose a reason for hiding this comment

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

@meonkeys Thank you for the above valuable ideas

I think License and Thanks are failing because of this

Screenshot 2026-03-20 at 1 15 37 AM

The root cause is in how whimsy's get_link_text() function in site-scan.rb reads link text. It collects all text nodes inside <a>, skipping only text whose parent is a <span> with a class ending in sr-only. The current index.html on asf-site was built from a template using <i> for the icon.

Screenshot 2026-03-20 at 1 32 17 AM

"gavel" parent is <i> so it is not skipped by whimsy and is collected. License's parent is plain <span> (no class) it is also not skipped and is collected. Result is combined text and down cased "gavel license", whimsy checks "gavel license" =~ /^license$/, no match so red. Same happens for thanks as it turns into "favorite thanks".

In this PR I have fixed the template in home-footer.html by changing the icon from <i> to <span class="material-icons icon-sr-only">

I will update the checks on run_whimsy_checks.rb, I think it is not working like the actual whimsy sitestandards.rb
I will also work on the ideas you have given for unit test, new workflow and script update. It makes more sense to have them to avoid checks failing on https://whimsy.apache.org/site/project/fineract.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @mansi75, just checking in on this. Should I merge this one or leave it open?

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