Opened 2 years ago

Closed 2 years ago

#30612 closed enhancement (fixed)

Set title of HTML page with Three.js viewer

Reported by: Joshua Campbell Owned by:
Priority: minor Milestone: sage-9.3
Component: graphics Keywords: threejs page title save
Cc: Paul Masson Merged in:
Authors: Joshua Campbell Reviewers: Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: 26dfb51 (Commits, GitHub, GitLab) Commit: 26dfb5130ab083a2a6e05500c2b5e6e549efa472
Dependencies: Stopgaps:

Status badges


When having several browser windows/tabs open with Three.js plots in them, it can be difficult to remember which is which. Since the title element in the generated pages is empty, the filename/path is displayed in Chrome/FireFox, and something like tmp_e0or9kcy.html isn't very helpful.

This ticket proposes a new page_title viewer option to set the title of the HTML page. Additionally, the page title should be used to suggest a filename when using the "Save as HTML" menu item instead of the generic graphic.html.

For example:

show(dodecahedron(), page_title="Dodecahedron")

...should produce a page titled "Dodecahedron" that suggests the filename Dodecahedron.html upon saving.

Change History (4)

comment:1 Changed 2 years ago by Joshua Campbell

Authors: Joshua Campbell
Branch: u/gh-jcamp0x2a/30612-threejs-page-title
Commit: 26dfb5130ab083a2a6e05500c2b5e6e549efa472
Status: newneeds_review

New commits:

26dfb51Allow the title of Three.js plot pages to be customized

comment:2 Changed 2 years ago by Eric Gourgoulhon

Reviewers: Eric Gourgoulhon
Status: needs_reviewpositive_review

LGTM. Thanks for this improvement!

comment:3 in reply to:  2 Changed 2 years ago by Joshua Campbell

Cc: Paul Masson added

Replying to egourgoulhon:

LGTM. Thanks for this improvement!

Thanks again!

comment:4 Changed 2 years ago by Volker Braun

Branch: u/gh-jcamp0x2a/30612-threejs-page-title26dfb5130ab083a2a6e05500c2b5e6e549efa472
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.