The bar already has the ⋯ menu this needs. It is gated behind a breakpoint, and Copy never enters it at any width.
Current behavior
On a published doc at ≥900px, the right side of the bar carries three secondary controls, two of which open their own dropdown:
theme · Copy ▾ (Doc only / Doc + comments) · Duplicate · Download ▾ (HTML / PDF) · Share · avatar
Three menus competing in one bar. Duplicate and Download are rare actions next to Share, but they take permanent inline space.
What already exists
server/overlay.js:1020 builds the ⋯ button (#tdoc-more-btn) and #tdoc-secondary-menu, already populated with duplicate, download, download-pdf (and saveas on forks), plus the version group.
It is hidden by default:
/* overlay.js:475 */
.tdoc-bar .tdoc-secondary-toggle { display: none; padding: 6px 10px; }
and revealed only by two rules, which also hide the inline buttons:
/* overlay.js:786-787, inside @media (max-width: 900px) */
.tdoc-bar #tdoc-duplicate-btn, .tdoc-bar #tdoc-download-wrap, .tdoc-bar #tdoc-saveas-btn { display: none; }
.tdoc-bar .tdoc-secondary-toggle { display: inline-flex; }
/* overlay.js:799-800 */
body.tdoc-narrow .tdoc-bar #tdoc-duplicate-btn, … { display: none; }
body.tdoc-narrow .tdoc-bar .tdoc-secondary-toggle { display: inline-flex; }
So below 900px the bar already looks the way this issue asks for. Above 900px it does not.
Copy is the odd one out
#tdoc-copy-md-btn is never in the ⋯ menu at any width. At <700px only its label span hides:
/* overlay.js:793 */
.tdoc-bar #tdoc-copy-md-btn span { display: none; }
leaving an icon-only Copy dropdown sitting next to ⋯ on phones — two separate menus on the narrowest screen, which is where there is least room for them.
Proposal
- Show ⋯ at every width: drop the
display:none default (overlay.js:475) and the two overrides that reveal it.
- Hide inline
#tdoc-duplicate-btn / #tdoc-download-wrap / #tdoc-saveas-btn unconditionally. The menu items already exist, so this is mostly deleting CSS.
- Fold Copy's two modes into ⋯ as
Copy as Markdown and Copy with comments, and drop the standalone control. This is the one part that is not just CSS — #tdoc-copy-md-menu's data-mode handler needs to be reachable from #tdoc-secondary-menu.
Result, at every width:
theme · Share · ⋯ · avatar
with ⋯ holding: Version (when >1) · Copy as Markdown · Copy with comments · Duplicate · Download HTML · Download PDF.
Open question
The version group inside ⋯ is currently hidden above 700px because the inline version chip covers it:
/* overlay.js:466-467 */
.tdoc-secondary-menu .tdoc-sec-versions { display: none; }
@media (max-width: 700px) { .tdoc-secondary-menu .tdoc-sec-versions { display: block; } }
If ⋯ becomes permanent, that rule should be a deliberate choice rather than an inherited one. Keeping the inline chip and the menu group seems right — switching versions is a reading action, not a management action, so it earns its inline spot in a way Duplicate and Download do not.
The bar already has the ⋯ menu this needs. It is gated behind a breakpoint, and Copy never enters it at any width.
Current behavior
On a published doc at ≥900px, the right side of the bar carries three secondary controls, two of which open their own dropdown:
Three menus competing in one bar. Duplicate and Download are rare actions next to Share, but they take permanent inline space.
What already exists
server/overlay.js:1020builds the ⋯ button (#tdoc-more-btn) and#tdoc-secondary-menu, already populated withduplicate,download,download-pdf(andsaveason forks), plus the version group.It is hidden by default:
and revealed only by two rules, which also hide the inline buttons:
So below 900px the bar already looks the way this issue asks for. Above 900px it does not.
Copy is the odd one out
#tdoc-copy-md-btnis never in the ⋯ menu at any width. At <700px only its label span hides:leaving an icon-only Copy dropdown sitting next to ⋯ on phones — two separate menus on the narrowest screen, which is where there is least room for them.
Proposal
display:nonedefault (overlay.js:475) and the two overrides that reveal it.#tdoc-duplicate-btn/#tdoc-download-wrap/#tdoc-saveas-btnunconditionally. The menu items already exist, so this is mostly deleting CSS.Copy as MarkdownandCopy with comments, and drop the standalone control. This is the one part that is not just CSS —#tdoc-copy-md-menu'sdata-modehandler needs to be reachable from#tdoc-secondary-menu.Result, at every width:
with ⋯ holding: Version (when >1) · Copy as Markdown · Copy with comments · Duplicate · Download HTML · Download PDF.
Open question
The version group inside ⋯ is currently hidden above 700px because the inline version chip covers it:
If ⋯ becomes permanent, that rule should be a deliberate choice rather than an inherited one. Keeping the inline chip and the menu group seems right — switching versions is a reading action, not a management action, so it earns its inline spot in a way Duplicate and Download do not.