You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1fe5cac
Browse filesBrowse the repository at this point in the historyBrowse files
Announcements were injected into the home route only. On a phone that left
them behind the bottom bar's More sheet: two taps and a page load. The rail
entry that covers this on desktop is hidden at that width, and the new right
column panel falls below the entire feed.
The header now carries an announcement icon at <=780px, and it opens a bottom
sheet in place. Above that width it stays hidden -- the rail entry and the
home panel already do this job, and three surfaces for one thing on one
screen is the duplication this redesign has been removing.
The icon is a link to /duyurular that script upgrades into a sheet opener, so
it works before and without JavaScript. It is a <dialog>: focus trap, Escape,
and an inert background come from the browser, and writing those by hand is
three chances to write them wrong.
Content comes from a new public /duyurular/ozet fragment rather than the page
shell. The header is on every page and most pages -- /about, /topics,
/iletisim -- never touch the worker at all; injecting into the shell would
have made the badge present on some pages and absent on others. The endpoint
returns HTML, not JSON, so the announcement card keeps one renderer; a client
drawing its own card would be a second one.
Severity and ids ride on data attributes. The loudest severity wins, so one
critical notice is not calmed down by three informational ones next to it,
and both icons ship in the markup with CSS choosing between them -- the
alternative was a second copy of the icon paths in the client. Read state is
localStorage, by id rather than by count: a withdrawn announcement lowers the
count and a stored "3 read" would mark a new one as already seen.
Costs, measured: 1826 bytes of shell HTML per page (931 trigger, 895 dialog)
and 250 bytes of gzipped CSS. Dead .announcement-strip rules paid 1491 raw
bytes of that back -- the strip's renderer went in the previous commit and
its styles stayed behind.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments