From 22754f6ae89b76adf08619d0193e19a10713951b Mon Sep 17 00:00:00 2001 From: NguyenND Date: Fri, 24 Jul 2026 12:21:44 -0400 Subject: [PATCH] Jul 24 - Update Rich-text editor to enhance table editor 5 --- .claude/settings.json | 3 ++- app.py | 17 +++++++++++++++++ static/css/style.css | 8 ++++++-- templates/admin/base.html | 2 +- templates/index.html | 2 +- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 55efff3..e69a1e1 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -32,7 +32,8 @@ "Read(//tmp/**)", "Bash(curl -sSL https://raw.githubusercontent.com/attoae/quill-table-better/main/src/utils/clipboard-matchers.ts -o cm.ts -w \"cm %{http_code}\\\\n\")", "Bash(curl -sSL https://raw.githubusercontent.com/attoae/quill-table-better/main/src/ui/table-menus.ts -o tm.ts -w \"tm %{http_code}\\\\n\")", - "Bash(curl -sSL https://raw.githubusercontent.com/attoae/quill-table-better/main/src/ui/table-properties-form.ts -o tpf.ts -w \"tpf %{http_code}\\\\n\")" + "Bash(curl -sSL https://raw.githubusercontent.com/attoae/quill-table-better/main/src/ui/table-properties-form.ts -o tpf.ts -w \"tpf %{http_code}\\\\n\")", + "Bash(python -m py_compile app.py)" ] } } diff --git a/app.py b/app.py index 30f7178..60b9b74 100644 --- a/app.py +++ b/app.py @@ -202,6 +202,23 @@ def create_app(): def healthz(): return {"status": "ok"} + @app.context_processor + def inject_asset_url(): + """`asset_url('css/style.css')` → the static URL with a `?v=` + cache-buster, so an edited CSS/JS file is always re-fetched instead of + being served stale from the browser/proxy cache.""" + from flask import url_for + + def asset_url(filename): + try: + version = int(os.path.getmtime( + os.path.join(app.static_folder, filename))) + except OSError: + version = 0 + return url_for("static", filename=filename, v=version) + + return {"asset_url": asset_url} + return app diff --git a/static/css/style.css b/static/css/style.css index 7390050..edd8e01 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -108,7 +108,9 @@ body{ .block__sub{color:var(--muted);font-size:.96rem;margin:14px 0 0;max-width:34ch} /* ---------- TOPICS (accordion) ---------- */ -.topics{list-style:none;margin:0;padding:0;border-top:1px solid var(--hair)} +/* min-width:0 lets this 1fr grid item shrink instead of being widened to a + table's intrinsic width (which would push sibling text past the card). */ +.topics{list-style:none;margin:0;padding:0;border-top:1px solid var(--hair);min-width:0} .topic{border-bottom:1px solid var(--hair)} .topic__head{ width:100%;background:none;border:0;cursor:pointer;text-align:left; @@ -147,7 +149,9 @@ body{ padding:2px 4px 30px 0;max-width:62ch; display:flex;flex-direction:column;gap:20px; } -.prose{color:var(--ink-soft);font-size:1.03rem} +/* min-width:0 so a wide table can't stretch this flex item; overflow-x lets a + genuinely too-wide table scroll within the prose box rather than clip text. */ +.prose{color:var(--ink-soft);font-size:1.03rem;min-width:0;overflow-x:auto} .prose p{margin:0 0 .8em} .prose p:last-child{margin-bottom:0} .prose strong{color:var(--ink);font-weight:600} diff --git a/templates/admin/base.html b/templates/admin/base.html index 1c2f2c7..6c13b06 100644 --- a/templates/admin/base.html +++ b/templates/admin/base.html @@ -8,7 +8,7 @@ - + {% block head_extra %}{% endblock %} diff --git a/templates/index.html b/templates/index.html index d7ea631..b4b00a0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,7 +8,7 @@ - +