Ticket #7404 (needs_work enhancement)
Display as much of a worksheet's title for which there's room
| Reported by: | mpatel | Owned by: | boothby |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.10 |
| Component: | notebook | Keywords: | |
| Cc: | jason, timdumol, was, kcrisman | Work issues: | |
| Report Upstream: | N/A | Reviewers: | |
| Authors: | Mitesh Patel | Merged in: | |
| Dependencies: | Stopgaps: |
Description
From sage-devel:
Jason Grout wrote: > William Stein wrote: >> Alex Ghitza wrote: >>> 3. long worksheet titles get cut off even if there would be enough >>> room to display them in their entirety (in my case, I had "Victorian >>> Algebra Conference 2009" which appeared as "Victorian Algebra >>> Conference 2...") >> True. It is tricky because fonts are proportionally spaced. > Why does that make it tricky? Make the div/table cell the maximum width > possible (and expand as the browser window expands), and let the browser > worry about when to cut off the text by setting the CSS style to chop > off the text. I suppose we'll miss the "..."; is that the tricky part?
Attachments
Change History
Changed 4 years ago by mpatel
-
attachment
trac_7404-css_worksheet_title.patch
added
comment:1 Changed 4 years ago by mpatel
- Cc jason, timdumol, was added
- Status changed from new to needs_review
The first take appears to work, although a very long title is visible under and beyond the "Save/Discard?" buttons.
I'm sure this is just one way to [attempt to] do it --- I'm not a CSS expert. Please feel to free to replace it. Either way, we should check that a candidate works in IE.
By the way, this patch may depend on other recent sagenb patches. Here's my current queue (ignore the version numbers):
trac_7316-sageinspect_defn.patch trac_7318-sphinxify_confdir.patch trac_7309-javascript-sage_v2.patch trac_7310-modals.6.patch trac_7332-css-escape.2.patch trac_sagenb-7341.patch # Tab completion. trac_sagenb-7346.patch # Vertical scrollbars. trac_7339-sagenb_cell_bugs.patch trac_7343-selenium-tests.4.patch trac_7390-sagenb_test_report_A.patch trac_7390-sagenb_test_report_B.patch trac_7404-css_worksheet_title.patch # This ticket! trac_7385-renaming-published-worksheets.patch trac_7384-sphinxify-docstrings.patch trac_7354-jsmath_undo_revision.patch trac_7322-jsmath_upgrade.patch trac_7106-paren_match_doc.patch
But it's likely that several of these commute.
comment:2 follow-up: ↓ 3 Changed 4 years ago by mpatel
- Cc kcrisman added
Replying to kcrisman:
Sweet. I love CSS.
comment:4 Changed 4 years ago by kcrisman
I should point out that I only love CSS, but am (also) not by any means an expert in it. Sorry.
comment:5 Changed 4 years ago by was
- Status changed from needs_review to needs_work
- Milestone set to sage-4.3
REFEREE REPORT:
(1) Looking at and reading the code -- it looks good.
(2) You should always set a milestone for the ticket. It helps a *lot* in keeping tickets from getting totally lost.
(3) This patch makes all the worksheet titles in the homescreen vanish, so that's a serious bug. See http://wstein.org/home/wstein/tmp/7404-a.png
(4) This patch also makes the top bar area look ridiculous (in my opinion) when the title is really long. See http://wstein.org/home/wstein/tmp/7404-b.png
comment:6 Changed 3 years ago by mpatel
- Report Upstream set to N/A
A [related] possibility: Use tablesorter to sort in the browser.

A first take that probably overdoes it. Apply to sagenb repo.