Commit graph notes/src/utils/modal.js
Author SHA1 Message Date
583481f926
Remove unused code. 2026-08-26 19:43:59 -06:00
3ef039d2de
Removed window.* definitions for testing. 2026-08-26 19:40:16 -06:00
c8f9132f92
Cleanup: Store refs instance for switching translation source. 2026-08-25 19:27:57 -06:00
5929d54605
Refactored verse parsing/processing.
LXX support pending.
2026-08-25 17:53:12 -06:00
13c2e33055
Fix "ff" parsing. 2026-08-24 21:40:22 -06:00
55d9f2d482
Added Refs class for processing chapter/verse numbers with the extension
of possible filters for special-case handling.
2026-08-24 21:36:03 -06:00
614961b220
Open dialog when receiving an appropriate URI query string. 2026-08-20 15:01:36 -06:00
13e66e4f93
Move dialog open to its own function. 2026-08-20 14:52:51 -06:00
c47bf0d0e0
Apparently there's a weird behavior in Android Chrome that this fixes.
The bug is that hitting "back" will trigger a cancel event and then the
dialog::backdrop will be removed first. The second "back" press will
remove the dialog or actually trigger history.back(), navigating back in
state.

The fix for this is to intercept the "cancel" event on the dialog and
then handle history management from there. Apparently this issue will be
triggered even if the history API isn't used, and the only way the user
can navigate normally with the dialog present is to actually hook into
the history API.

So, this is kind of a necessary change.

Annoying.

Thanks, Gemini, for the introspection and links.
2026-08-20 11:38:40 -06:00
efa86c6581
Disable state management for now. 2026-08-20 08:37:07 -06:00
8b5d92591d
History implementation appears to cause issues in Chrome.
It would seem that Chrome's history state with dialog.showModal causes
issues requiring hitting "back" twice, even if history.pushState isn't
ever used.
2026-08-20 08:32:10 -06:00
ae202e9ce6
Monitor pushState/popState for dismissing dialog(s). 2026-08-19 17:53:26 -06:00
9e368526c4
Updated drop-down and renderer for more testament-centry logic.
In the case of the drop-down, if a translation doesn't contain the
visible testament (e.g. the LXX while opening a NT passage), it will be
excluded from the list.

In the case of opening a link that is not contained in the currently
configured translation, a reasonable default will be selected instead.
2026-08-19 14:45:15 -06:00
a270c45edc
Removed dead code. 2026-08-18 20:51:01 -06:00
6de6396023
Removed unused code. 2026-08-18 20:50:34 -06:00
011142c578
Removed debugging output. 2026-08-18 20:50:12 -06:00
639dba4520
Moved dialog handling into a JS class for some state management.
Translation selection requires localStorage support for state to be
remembered between sessions.
2026-08-18 20:48:25 -06:00
35cb0f1f6a
Preliminary logic for selection translation. 2026-08-18 15:23:25 -06:00
bf5a36d590
Removed debugging output from console. 2026-08-18 14:56:56 -06:00
558dd6b3ac
Several changes to meta handling and rendering:
1) Translation metadata has move from t9nmeta.js to meta.js.
2) Translation metadata is now going to be generated by
   tools/genbooks.py (incomplete)
3) Translation metadata now includes a default translation to use via
   the helloao.org API.
4) Link to Bible Gateway has been removed from the scripture dialog.
2026-08-17 19:43:54 -06:00
b541b45062
Moved metadata to separate file. This will be generated automatically in
the future.
2026-08-13 17:01:13 -06:00
b081642925
Available translations container.
Upon thinking about this, I believe it may be a better idea to include
additional metadata as well. This meay require a script.
2026-08-13 13:31:26 -06:00
17af56303f
Fixed "open" hint for Bible Gateway. 2026-08-09 14:20:40 -06:00
32a7c08d95
Rework to include "spinner" icon for loading state and dark mode
support.
2026-08-06 20:01:18 -06:00
bd59a73859
Added scripture ref to link. 2026-08-06 19:02:04 -06:00
1763a427ba
Added heading. 2026-08-06 18:54:19 -06:00
272740effe
WIP fixes, mostly working, but display bugs are present.
As of now, if there is an inline footnote, it will cause a paragraph
break because of the way the JSON processor currently handles "poem"
declarations.

The only solution for this may be to rework the loop so some lookahead
is possible.
2026-08-06 18:19:27 -06:00
69bb3f4ad3
Dialog WIP, mostly working.
Styling still needs tweaking and the Bible Gateway link needs to be
fixed.
2026-08-06 15:41:25 -06:00
118e1ab98e
Display errors tied to <p> placement. 2026-08-06 13:41:52 -06:00
d59dd67812
WIP modal support. 2026-08-05 11:17:39 -06:00
cf7e8f6026
Added refs parser and fetch. 2026-08-03 15:34:10 -06:00
ec727d5e0e
Added base ref parser. 2026-08-01 14:07:41 -06:00
e4f995ae07
Added list of valid books and their metadata. 2026-07-30 23:58:15 -06:00
b272691e37
Allow closing via click. 2026-07-30 16:17:31 -06:00
2aeb21a7ba
Modal tests. 2026-07-29 22:55:24 -06:00
a530e8c4be
Added modal plugin placeholder. 2026-07-29 15:24:02 -06:00