8000 Overhaul Document Tabs UI: three-dot menu, sequential naming, reset, and delete-last-tab by Copilot · Pull Request #41 · ThisIs-Developer/Markdown-Viewer · GitHub
[go: up one dir, main page]

Skip to content

Overhaul Document Tabs UI: three-dot menu, sequential naming, reset, and delete-last-tab#41

Merged
ThisIs-Developer merged 2 commits intomainfrom
copilot/update-document-tabs-ui
Mar 8, 2026
Merged

Overhaul Document Tabs UI: three-dot menu, sequential naming, reset, and delete-last-tab#41
ThisIs-Developer merged 2 commits intomainfrom
copilot/update-document-tabs-ui

Conversation

Copy link
Contributor
Copilot AI commented Mar 7, 2026

The tabs UI lacked per-file options (rename/duplicate/delete), auto-renamed files based on content, prevented deleting the last tab, and had no reset mechanism.

Changes

Per-file options menu

  • Each tab now renders a button that opens a dropdown with Rename, Duplicate, and Delete actions — available on all tabs including the Welcome file
  • Rename opens a modal with keyboard support (Enter/Escape); Duplicate inserts a (copy) tab immediately after the source

Delete & last-tab behavior

  • Removed the tabs.length <= 1 guard from closeTab() — any tab can now be deleted
  • Deleting the last tab auto-creates a new Untitled N tab instead of blocking

Sequential, stable file naming

  • Removed deriveTitleFromContent() and the debounced updateActiveTabTitle() — files no longer auto-rename from editor content
  • New tabs are named Untitled 1, Untitled 2, etc. via a monotonically increasing counter persisted in localStorage; numbers are never reused after deletion

+ Create button placement

  • The create button is now rendered inside renderTabBar() at the end of the scrollable tab-list, keeping it visually adjacent to the last tab

Reset

  • Added a Reset button (top-right of tab bar) that shows a confirmation modal ("Are you sure you want to delete all files?" / Cancel / Delete All)
  • On confirm: clears all tabs, resets the untitled counter, and recreates the Welcome file

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
vercel bot commented Mar 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Mar 7, 2026 7:00pm

…tab support to tabs UI

Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
cloudflare-workers-and-pages bot commented Mar 7, 2026

Deploying markdown-viewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: cedd372
Status: ✅  Deploy successful!
Preview URL: https://631dfbb4.markdown-viewer.pages.dev
Branch Preview URL: https://copilot-update-document-tabs.markdown-viewer.pages.dev

View logs

Copilot AI changed the title [WIP] Update Document Tabs UI for improved usability Overhaul Document Tabs UI: three-dot menu, sequential naming, reset, and delete-last-tab Mar 7, 2026
@cloudflare-workers-and-pages
Copy link

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: cedd372
Status: ✅  Deploy successful!
Preview URL: https://6c4ab28d.markdownviewer.pages.dev
Branch Preview URL: https://copilot-update-document-tabs.markdownviewer.pages.dev

View logs

@ThisIs-Developer ThisIs-Developer marked this pull request as ready for review March 8, 2026 04:12
@ThisIs-Developer ThisIs-Developer merged commit 0663392 into main Mar 8, 2026
6 checks passed
@ThisIs-Developer ThisIs-Developer deleted the copilot/update-document-tabs-ui branch March 9, 2026 10:09
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

0