Repository navigation
fix(homepage): hide broken directory-footer links + sign-in padlock (#1651) - #1656
Merged
Merged
Conversation
…1651) The homepage directory footer (row 7) and verb sub-pages rendered every shelf entry regardless of the nightly link-health verdict, so visitors clicked links the job already knew were dead. Only the community lane filtered BROKEN entries. - directory-footer.html + verb/list.html now skip linkStatus=='BROKEN' rows (linkStatus is already baked into homepage_shelves.json via the SELECT-all build feed; auto-heals when a link is fixed). - Add HomepageShelves.requiresLogin (Boolean, default false, additive hdbtable column, admin-editable, omitted from seed CSV) and render an accessible padlock affordance next to links that need a sign-in, in both the Hugo first-paint HTML (new login-lock.html partial) and the link-explainer Vue island (which replaces the anchor on hydration). - Expose requiresLogin in the admin Homepage Shelves LR + Object Page. Verified with a real Hugo render: BROKEN 'SAP BTP Cockpit' absent from footer + /operate/, padlock present on a requiresLogin entry in the footer and on /build/ + /operate/. Unit tests (popover + schema + admin CRUD + build feed) green; cds build --production emits the new column.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1651.
Problem
The homepage directory footer (row 7) and the per-verb sub-pages (
/build/,/operate/, …) rendered everyHomepageShelvesentry regardless of the nightly link-health verdict. Visitors clicked links thehomepage-link-healthjob already flaggedBROKEN(e.g. the reporter's BTP-CLI example). Only the community lane filtered them. The issue also asked that links requiring a logon be marked so users know before clicking.Changes
directory-footer.htmlskipslinkStatus == "BROKEN";verb/list.htmlfilters them out of the shelf query (so the section count + list both exclude them).linkStatusis already baked intohomepage_shelves.jsonby the SELECT-all/build/homepage-shelvesfeed, so this auto-heals when a link is fixed — no new plumbing.HomepageShelves.requiresLogin(Boolean, defaultfalse; additive.hdbtablecolumn; admin-editable; intentionally omitted from the seed CSV so an HDI redeploy never wipes admin-curated values). Renders an accessible padlock (role="img",aria-label="Sign-in required") next to the link in both:partials/homepage/login-lock.html, andLinkExplainerPopoverVue island (which replaces the anchor on hydration, so it must render its own copy).requiresLoginadded to the Homepage Shelves List Report + Object Page (app/admin-annotations.cds), editable at/admin-ui/#homepage.Not addressed here (data curation, not code)
The reporter also noted "RAG on HANA Cookbook" points at generic
github.com/SAP-samples. That row islinkStatus:OK(it resolves) — it's a wrong-target content fix for an admin via/admin-ui/#homepage, not a code change.Verification
Real Hugo render (
hugo -s hugo) with arequiresLogin=truefixture:SAP BTP Cockpitabsent from the directory footer and/operate/.requiresLoginentry in the footer and on/build/+/operate/; other links still render (non-empty).Tests green:
LinkExplainerPopover.test.ts(+2 lock cases),test/unit/db/homepage-schema.test.js(+1),test/unit/admin-homepage-crud.test.js,test/unit/srv/build-feeds-explainers.test.js.cds build --productionemitsrequiresLogin BOOLEAN NULL DEFAULT FALSEoncom.sap.developers.ims.HomepageShelves.hdbtable(plain hdbtable → safe online ALTER on deploy).Note:
test/hybrid/homepage-shelves-new-fields.test.js(HANA-backed) not run in this env; the additive column + admin annotation follow the existing #759 field pattern.