Closed Technologicat closed 5 months ago
Ah, and I forgot to mention it explicitly, but this will resolve #17 when complete.
Documenting how to add a new setting to the Timelines extension:
timeline.html
defaultSettings
in index.js
.loadSettings
in index.js
.idsToSettingsMap
in the jQuery entry point in index.js
. This sets up event handlers to update the settings when they are changed in the UI, and to auto-save the settings when a value changes.onInputChange
in index.js
.
I haven't yet analyzed whether the settings processing done in loadSettings
and in the jQuery entry point are both necessary. EDIT: Yes, they are. loadSettings
updates extension_settings.timeline
→ Extensions ⊳ Timelines settings UI when the extension starts up, whereas the jQuery entry point sets up event handlers to update in the other direction (and to auto-save settings when a value changes).
Note also that some UI elements may need introducing a new CSS style class in tl_style.css
, so that the code can query for the UI element(s) easily. For example the buttons at the upper edge of the timeline view are implemented like this (events are wired to the buttons after finding each button via a CSS style class search).
@Cohee1207: This Timelines UX PR will probably be ready for review tomorrow.
I'll just look at the positioning of the full info panel, and then Timelines will be complete for now.
As always in software development, there are still a lot of things that could be fixed (marked as TODO in the code comments) - but nothing really important. I think we can leave those for later.
@Cohee1207: Now this PR is complete.
I'll give it a final once-over tomorrow, then it's ready for review. I'll let you know.
@Cohee1207: It's done, with some last-minute fixes and cleanups. Please review.
The new screenshot is loaded from my fork, not the original, because I don't have write access to the original. It's 1.2MB at PNG compression level 9 (even though it's only from a 1080p screen, to keep file size down), so I agree with @city-unit's original decision not to include the screenshot file in the repo itself.
EDIT: Also, I scrubbed all unused stuff from the CSS stylesheet. EDIT: Removed a done TODO marker from code comments.
By the way, I have some more changes stashed - support for multiple parent nodes*, highlight edges on hover, click edge to navigate, and per-timeline navigation buttons in the full info panel.
I can push these changes here, or if you prefer, send them in separately later.
Thanks for the merge!
And for your patience keeping up with the pace of these PRs :)
Oh, and nice icon choices!
Didn't yet occur to me to look inside fontawesome
for those.
Here's the UX overhaul PR for Timelines.
Changelog:
navigateToMessage
:branch
is true, always create a new branch (as we did before)branch
is false, attempt to avoid creating a branch (no more branch proliferation - previously, navigating to a swipe always created a branch)Auto-expand Swipe Nodes
to start in "expand swipes" mode when the timeline view first opens (or whenever the graph is refreshed).Fixed Tooltip
byFixed Position for Full Info Panel
, and add a separateFixed Position for Tooltip
.Lock Nodes
. It did nothing, because nodes were always locked after running the layout, regardless of the value of this setting. The graph changes often enough (besides being large and never saved) that manual editing of node positions is not useful.Esc
to close timeline view (like many other panels in ST)Ctrl+Shift+F
to focus the search text entry (a bare Ctrl+F would also open the browser's "find in page" bar)debug
/info
/warning
/error
levels explicitly, not the genericlog
.navigateToMessage
: If this goes wrong, it could be pretty hard to debug, so add enough log messages to figure out what it did and why.Left for later, NOT done now:
Tab
to jump between chat branches matching a search.