Add "Upload Content" guide, sidebar link, and improved modal button

- Create `assets/svg/upload-content-icon.svg`
- Create `content/upload-content.md` with Cloudflare R2 setup instructions
- Create `views/upload-content.html` to render the guide
- Add "Upload Content" link to `components/sidebar.html`
- Add styled "Learn How" button to `components/upload-modal.html` in the R2 credentials section
This commit is contained in:
google-labs-jules[bot] committed 2026-01-09 03:39:05 +00:00
1 parent cd38fd0c2a
commit dc6daa07f7
5 files changed
+96 -2

No files matched your search

+13
View File
@@ -159,6 +159,19 @@
/>
<span class="sidebar-text">Getting Started</span>
</a>
<a
href="#view=upload-content"
class="sidebar-nav-link sidebar-nav-link--sub"
title="Upload Content"
>
<img
src="assets/svg/upload-content-icon.svg"
alt=""
aria-hidden="true"
class="sidebar-icon"
/>
<span class="sidebar-text">Upload Content</span>
</a>
<a href="#view=roadmap" class="sidebar-nav-link sidebar-nav-link--sub" title="Roadmap">
<img
src="assets/svg/roadmap-icon.svg"
+2 -2
View File
@@ -126,8 +126,8 @@
</div>
<div class="flex items-center justify-between">
<p class="text-xs text-muted">Required for direct file uploads.</p>
<a href="#view=upload-content" target="_blank" class="flex items-center gap-1 text-xs text-accent hover:underline">
<img src="assets/svg/upload-content-icon.svg" alt="" class="h-3 w-3" />
<a href="#view=upload-content" class="btn btn-ghost btn-xs text-accent gap-1 pl-1 pr-2">
<img src="assets/svg/upload-content-icon.svg" alt="" class="h-4 w-4" />
Learn How
</a>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+81
View File
@@ -0,0 +1,81 @@
from playwright.sync_api import sync_playwright, expect
import re
def run(playwright):
browser = playwright.chromium.launch(headless=True)
page = browser.new_page()
# Navigate to the app
page.goto("http://localhost:8080")
# Wait for app
page.wait_for_selector("#app")
# Dismiss disclaimer if present
try:
if page.locator("#disclaimerModal").is_visible():
page.locator("#disclaimerModal").get_by_role("button", name="I understand").click(timeout=2000)
except:
pass
# 1. Verify the Sidebar Link
print("Verifying Sidebar Link...")
# Open "More" dropdown in sidebar
page.locator("#footerDropdownButton").click()
# Wait for dropdown
page.wait_for_selector("#footerLinksContainer:not(.hidden)")
# Check for "Upload Content" link
sidebar_link = page.get_by_role("link", name="Upload Content")
expect(sidebar_link).to_be_visible()
# Verify icon in sidebar link
sidebar_icon = sidebar_link.locator("img")
expect(sidebar_icon).to_have_attribute("src", "assets/svg/upload-content-icon.svg")
page.screenshot(path="verification/sidebar_link.png")
print("Screenshot of sidebar link saved.")
# 2. Verify the Modal Link Update
print("Verifying Modal Link...")
# Open modal
page.evaluate("document.getElementById('uploadButton').classList.remove('hidden')")
page.evaluate("document.getElementById('uploadButton').style.display = 'block'")
page.wait_for_selector("#uploadButton", state="visible")
page.locator("#uploadButton").click()
# Wait for modal
modal = page.locator("#uploadModal")
expect(modal).to_be_visible()
# Open storage settings
page.locator("#btn-storage-settings").click()
# Verify link is now button-like and no target=_blank
settings_section = page.locator("#section-storage-settings")
link = settings_section.get_by_role("link", name="Learn How")
expect(link).to_be_visible()
# Check class for button styling (using regex on the class attribute string directly)
class_attr = link.get_attribute("class")
if not re.search(r"btn.*btn-ghost.*btn-xs", class_attr):
raise Exception(f"Link classes do not match expected button styling. Found: {class_attr}")
# Check href
expect(link).to_have_attribute("href", "#view=upload-content")
# Check NO target="_blank"
target = link.get_attribute("target")
if target == "_blank":
raise Exception("Link still has target='_blank'")
print("Link target verified (not _blank).")
page.screenshot(path="verification/upload_modal_updated.png")
print("Screenshot of updated modal saved.")
browser.close()
with sync_playwright() as playwright:
run(playwright)