Page MenuHomePhabricator

[e.cash] Announcement bar edits
ClosedPublic

Authored by johnkuney on Aug 2 2023, 17:13.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC05b571ee5321: [e.cash] Announcement bar edits
Summary

In preparing the stealth mode switch-over I noticed the announcement bar at the top of the nav could be made more flexible.
Right now it requires it to be a link, but maybe we dont want it to be a link (or dont have a link for it)
It also does not utilize the custom link component so that external links are automatically opened in new tabs.
So modifying it to a component and using custom link and conditional rendering based on the props

Test Plan

Preview the site, and check out the announcement bar. It should look and function the same
try npm run dev - go to navbar component in an editor, and try changing the announcement bar href prop to /get-ecash.
It should not open in new tab now
try removing the href prop
It should become not a link and have no hover effect

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman requested changes to this revision.Aug 2 2023, 18:46
bytesofman added a subscriber: bytesofman.
bytesofman added inline comments.
web/e.cash/components/navbar/index.js
66 ↗(On Diff #41678)

If we are using conditional rendering and props in this way, AnnouncementBar should be its own componenet, with link as an optional prop. The component itself should handle the rendering logic.

This revision now requires changes to proceed.Aug 2 2023, 18:46
johnkuney edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Aug 2 2023, 22:06
This revision was automatically updated to reflect the committed changes.