Fossil

History of src/pikchrshow.c of 8a4304eae23e796f
Login

History of src/pikchrshow.c of 8a4304eae23e796f

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of file src/pikchrshow.c at check-in 8a4304eae23e796f

2025-08-12
15:04
Revamp the Copy Buttons for a more responsive user experience. See the [branch/copybtn.js-responsive | wiki page linked to this branch] for more details. ... (file: [2d7c947dd9] check-in: [32c3a210c8] user: florian branch: copybtn.js-responsive, size: 22074)
2025-04-25
15:45
Omit the --th option from the "pikchr" command and all of the complication that flows out of that option. The option is not used by anyone, as far as I can tell. ... (file: [f6a74743a9] check-in: [7ef474d587] user: drh branch: simplify-pikchr-cmd, size: 22057)
2024-10-14
01:10
Cherry-pick the show-in-pikchrview feature that was added to the omit-cr branch. ... (file: [be8c7290e1] check-in: [521da5cd31] user: drh branch: trunk, size: 26067)
2024-10-12
23:08
Minor style tweaks to the open-in-pikchrshow links. No functional changes. ... (file: [5177deaa0a] check-in: [7e97f4999b] user: stephan branch: omit-cr, size: 26068)
22:18
Add a 'title' attribute to the new open-in-pikchrshow links, which serves as a tooltip in desktop browsers. ... (file: [43e21b1963] check-in: [4f6282357c] user: stephan branch: omit-cr, size: 26070)
22:12
Add a experimental 'open in /pikchrshow' link beneath the source code view of rendered pikchrs. This has only been tested in the forum view and needs further experimentation, and perhaps a way to disable it, in other views. ... (file: [ad6549ac2a] check-in: [ca27e69179] user: stephan branch: omit-cr, size: 26004)
12:03
Emit only \n, not \r\n, even in places where protocols technically require a full \r\n. Provide a compile-time option -DSEND_CR=1 that includes the CRs when necessary. ... (file: [337c9b9514] check-in: [0dcce257b0] user: drh branch: omit-cr, size: 25545)
2024-03-05
08:16
Add -dark flag to the pikchr command to tell pikchr to render in dark mode. This is the first part of a request from [forum:8f18c016fe|forum post 8f18c016fe]. ... (file: [2fd902bca9] check-in: [91a73ec348] user: stephan branch: trunk, size: 25544)
2024-02-02
22:18
Remove trailing whitespace from non-external C files. ... (file: [e37c19e500] check-in: [7db0a2d910] user: danield branch: fix-overlength-lines, size: 25192)
2023-01-09
13:06
Further consistency improvements in docs for various commands. ... (file: [2be1694c1e] check-in: [2512d2d472] user: km branch: trunk, size: 25210)
2022-12-21
09:31
Improved consistency for --help option descriptions. ... (file: [526a8c7808] check-in: [2e56ef4e8d] user: km branch: trunk, size: 25212)
09:00
Improved consistency for --help option descriptions: begin with uppercase letter; do not use a period at the end of short-ish sentences. ... (file: [6354a67807] check-in: [de684083c6] user: km branch: spelling-fixes, size: 25213)
2022-12-20
09:46
Change spelling for check-in and similar ... (file: [7ee4ebf15e] check-in: [d9c4321e7a] user: danield branch: check-in-spelling, size: 25222)
2022-11-16
20:05
Fix harmless typos reported by [forum:/forumpost/15f7327318|forum post 15f7327318]. ... (file: [8fa3f31403] check-in: [f3adbd8874] user: drh branch: trunk, size: 25221)
2022-11-13
16:26
Apply fixes to all web views to pass WCAG 2.1 tests performed by "axe DevTools" browser extension. Most fixes related to screen reader compatibility, like making sure that form elements have labels. Some color changes to improve contrast on Default skin. Made more HTML5 compliant. Minor improvement to select combo boxes for UX. Improved Search form UX. Two minor bug fixes for malformed HTML. Fixed help pages to resolve issues with non-compliant HTML being generated. Mostly documented at https://fossil-scm.org/forum/forumpost/aafb17a981df4166 ... (file: [4141f9aa7e] check-in: [1f231db380] user: ericwikman branch: wcag-2.1, size: 25192)
2022-06-10
14:12
Minor /pikchrshow CSS cleanups. ... (file: [9794857564] check-in: [864ed8d0a3] user: stephan branch: trunk, size: 25220)
2022-06-07
23:09
Resolved auto-fit mode not rendering in Chromium. ... (file: [6c66b5af43] check-in: [11f779039e] user: stephan branch: pikchrshow-wasm, size: 25280)
12:07
More pikchrshow cleanups. Corrected the body text for the markdown/wiki render modes (was using the SVG instead of pikchr code). Center the pikchr when not in auto-fit mode. ... (file: [85b663955d] check-in: [e23286a60b] user: stephan branch: pikchrshow-wasm, size: 25210)
11:37
Ported the various preview mode toggles and clipboard copy from legacy pikchrshow to wasm pikchrshow. ... (file: [dc24c7a4a3] check-in: [e513090c31] user: stephan branch: pikchrshow-wasm, size: 25018)
09:07
pikchrshow: refactored layout to use fieldsets for the input/output area wrappers and moved their button controls into the LEGEND elements. Various minor layout tweaks. ... (file: [7c86dcd864] check-in: [577ab3bede] user: stephan branch: pikchrshow-wasm, size: 24725)
2022-06-06
20:54
Consolidated some CSS. Minor pikchrshow layout tweaks. ... (file: [4c7641ebf7] check-in: [ae8f2ebe4b] user: stephan branch: pikchrshow-wasm, size: 24649)
20:13
pikchrshow layout tweaks. ... (file: [43cb87c2b0] check-in: [32526f32e7] user: stephan branch: pikchrshow-wasm, size: 24403)
18:51
Fixed legacy pikchrshow preview button, broken by hijacking its URI for the new pikchrshow mode. In side-by-side mode when auto-render is on, cap each half at max-width 50% to help keep the UI from flopping around. ... (file: [25520969f3] check-in: [c8e9116565] user: stephan branch: pikchrshow-wasm, size: 24340)
18:02
Replace /pikchrshow with a WASM-based version and rename the prior version to /pikchrshowcs (cs=client/server). There are still a couple layout/style quirks to resolve, and a feature or two to port from the legacy app, but it more or less works. ... (file: [9134c66233] check-in: [321f01a86e] user: stephan branch: pikchrshow-wasm, size: 24190)
2021-10-05
21:53
Fix the error display rendering for Pikchr diagrams. [forum:/forumpost/d5897397f5|Forum post d5897397f5]. ... (file: [df3ca9e498] check-in: [3fa1f2429b] user: drh branch: trunk, size: 19154)
2021-09-29
16:45
Consolidated /wikiedit, /pikchrshow, /fileedit, and /chat to use shift-enter to run preview mode. The former 3 previously used ctrl-enter but it was poorly documented and probably not widely used like ctrl-enter is in chat (to send a message). ... (file: [187c8b27b6] check-in: [13fabf3f4d] user: stephan branch: trunk, size: 19151)
2021-08-25
23:47
More improvements to login redirects. See the discussion on the [forum:/forumpost/f81625500d96cc0f|forum thread f81625500d96cc0f]. ... (file: [acafe5f1b3] check-in: [e5c16594b3] user: drh branch: trunk, size: 19150)
2021-03-11
13:22
Numerous help text consistency tweaks based on forum discussion [forum:8c644048f0]. ... (file: [a66bef9c5b] check-in: [4cb50c4ef3] user: stephan branch: trunk, size: 19153)
2020-12-22
12:13
Removed the parameter from style_finish_page() since the resulting content div class is now redundant with respect to the body class. This potentially breaks CSS made against old class names that a prior commit on this branch changed, but such skins would be made against an unreleased version of Fossil, it's unlikely many are using that first version of the feature anyway, and most of the class names did *not* change unless you were targeting a "div" instead of "body" or just a generic class name. None of the shipping skins are affected. ... (file: [274299063c] check-in: [0e83ca88ce] user: wyoung branch: body-feature-class, size: 19161)
2020-12-04
18:35
The variadic function builtin_fossil_js_bundle_or() was using 0 as a sentinel to detect end-of-list, but that isn't equivalent to NULL in a list of pointed-to objects in all C compilers, on all systems. Using a GCC/Clang function attribute to force a warning when 0 is passed instead of NULL, then fixed all resulting warnings. This fixes the SEGV reported in [forum:/forumpost/5feca9c36a|forum post 5feca9c36a] on Mac OS X 10.11 with Clang from Xcode 7. Later versions of Clang on macOS don't have this problem, but it's still UB, so fixing it may solve some pain for us later on. ... (file: [46efd599c4] check-in: [815b4fc493] user: wyoung branch: trunk, size: 19173)
2020-11-22
13:18
Minor typo fix in /pikchrshow. ... (file: [003be715a7] check-in: [09cd585f80] user: stephan branch: trunk, size: 19170)
2020-11-09
19:21
Automatically invert Pikchr colors in dark mode skins, based on the "white-foreground" setting. ... (file: [680a22f971] check-in: [71c4db598a] user: drh branch: trunk, size: 19169)
2020-11-07
13:25
Rename the "style_body_and_footer()" interface to "style_finish_page()" and add a more detailed header comment to the implementation. ... (file: [57305c308d] check-in: [942b2076c6] user: drh branch: default-css-cleanups, size: 19024)
2020-11-05
23:15
Added a parameter to style_footer() and renamed it to match its actual function (style_body_and_footer()) so we can add a CSS class to each page that indicates which major Fossil feature served the page, so we can have module-specific CSS. ... (file: [5e3cd55992] check-in: [ef5424b683] user: wyoung branch: default-css-cleanups, size: 19028)
2020-10-07
07:07
Removed an extraneous space from pikchrshow DOM output. pikchr command error output now prepends a newline to pikchr-level errors to keep line number comment alignment intact for the first line. ... (file: [a9d1e00bc5] check-in: [c3b2671f6d] user: stephan branch: trunk, size: 19007)
06:59
pikchr_process() now makes use of the as-yet-not-public PIKCHR_PLAINTEXT_ERRORS flag to maintain control of the error output DOM structure. ... (file: [8db5c6fec2] check-in: [ce3046290b] user: stephan branch: trunk, size: 19023)
2020-10-04
14:35
Exchanged most uses of %s(g.zTop) and such in the code with use of %R in Fossil's special printf() type functions. (The branch is named after just one of several of these, mprintf(), being one of the shortest names.) At the least, this is shorter, simpler code, but there is also some hope that it may fix some doubled slash problems someone is having on the forum. (https://www.fossil-scm.org/forum/forumpost/1ea72176e0) ... (file: [700bb4b903] check-in: [2907721acd] user: wyoung branch: prefer-mprintf-r, size: 18911)
2020-09-19
16:36
Moved pikchr_process() nonce so that it also applies for error output. Added missing 'error' CSS class to the error-report PRE tag. Added mention of Ctrl-Enter in pikchshow intro text. ... (file: [38230d83b2] check-in: [11e7960e51] user: stephan branch: trunk, size: 18927)
2020-09-18
21:11
Minor doc updates, removed some dead code. ... (file: [e6b56b33f1] check-in: [3ec33f98f7] user: stephan branch: trunk, size: 18933)
20:01
Added pikchr block 'source-inline' modifier for the 'source' flag which tells the latter that the sources should be rendered inline (same position as the graphic), rather than left-aligned. ... (file: [833acc5163] check-in: [3f2c0af278] user: stephan branch: trunk, size: 19000)
19:06
Reimplemented pikchr show/hide entirely in CSS, so it's now controlled by toggling the 'source' class on the outermost DIV element. Less JS and easier to implement in 3rd-party pikchr clients. ... (file: [939b88042b] check-in: [947c039073] user: stephan branch: trunk, size: 18224)
10:32
An alternate impl for centering pikchrs which does not rely on margin:auto. ... (file: [82899a434f] check-in: [2963f440e8] user: stephan branch: trunk, size: 18742)
07:37
The routines which emit fossil.XYZ.js modules now understand their dependencies, emit any deps in dependency order (recursively), and do not emit a given module more than once (simplifies usage and is an and overall improvement in cacheability). Added the pikchr click support to more pages. ... (file: [56d48a9771] check-in: [9b2b6f5b1c] user: stephan branch: trunk, size: 18554)
05:07
Minor C-side fossil JS API simplification to ease upcoming changes. ... (file: [57c51145d9] check-in: [58d86b16bf] user: stephan branch: trunk, size: 18563)
02:54
Always include a \n after the opening safe_html() nonce when generating Pikchr output, for improved human readability of the generated HTML. ... (file: [776a65bb73] check-in: [39b2081e6e] user: drh branch: trunk, size: 18647)
01:21
pixchr layout changes requested at [https://pikchr.org/home/forumpost/504f54f61b]. See the comments about alt/ctrl/meta keys. ... (file: [71bf45d24e] check-in: [cd22f0f07d] user: stephan branch: trunk, size: 18642)
2020-09-17
23:44
pikchr command doc updates. ... (file: [154a1dc0b9] check-in: [82a0b517a7] user: stephan branch: trunk, size: 18540)
23:11
Renovated the pikchr click handling as discussed off-list with drh. ... (file: [22855d4cd8] check-in: [938bb6c708] user: stephan branch: trunk, size: 18224)
16:31
Implemented most of the feedback from [https://pikchr.org/home/forumpost/f538d8e7f7], with the exceptions being documented in that thread. /pikchrshow now longer uses the mode-swap feature (seems superfluous there) and tapping anywhere in the body, outside of the source/svg container element, now turns off those buttons on all pikchrs where they are currently visible. Consolidated pikchr-rendering impl for markdown/fossil/pikchrshow/pikchr command. ... (file: [fb354006f1] check-in: [4f69773183] user: stephan branch: trunk, size: 16579)
2020-09-15
13:42
Make use of the new PIKCHR_INCLUDE_SOURCE flag via /pikchrshow and the pikchr CLI command. ... (file: [127a388623] check-in: [7da8813eef] user: stephan branch: trunk, size: 13888)
07:51
Consolidate pikchrshow page/pikchr command use of pikchr()/th1 into a shared routine. Though /pikchrshow does not currently allow th1-processed scripts, it might be interesting to enable for users with edit/checkin (or admin) rights. ... (file: [d2d61f5262] check-in: [893bf2a146] user: stephan branch: trunk, size: 13535)
2020-09-14
10:48
Renamed fossil.pikchr-util.js to fossil.pikchr.js. Minor UI tweaks in the pikchr-related bits. ... (file: [64228fafe1] check-in: [f5c040869d] user: stephan branch: trunk, size: 10609)
09:05
Added UI control to toggle arbitrary pikchr SVG files between SVG and source views, along with a copy button to copy the source of the currently-selected view. Requires pikchr.c code which is not currently in the fossil tree, but once that code is imported, this feature will activate automatically. Currently only used by pikchrshow, but is trivial to activate in arbitrary pages. fossil.copybutton API now uses flashOnce as its default oncopy event handler, to simplify its most common usage. ... (file: [f5e96289c6] check-in: [475b3a7fbb] user: stephan branch: trunk, size: 10582)
05:38
Minor pikchr command doc update. ... (file: [a5603188ee] check-in: [120558e50d] user: stephan branch: trunk, size: 10567)
02:06
pikchrshow now supports stashing a single pikchr to/from browser-local storage to enable switching back and forth between example scripts while editing one's own script. Experimentally re-indented the C-side implementation to make its generated HTML hierarchy clearer. Over-the-wire size is now 4.8kb. ... (file: [1f756a9c02] check-in: [49a04c97b5] user: stephan branch: trunk, size: 10452)
00:42
Added pikchr CLI command to process pikchr scripts, optionally with embedded TH1. ... (file: [04c96a6dee] check-in: [5173701de4] user: stephan branch: trunk, size: 9731)
00:27
pikchr command doc updates. ... (file: [91374d0bb4] check-in: [f2248f819d] user: stephan branch: pikchr-th, size: 9700)
00:06
Changed th1 enable_htmlify call semantics. Fixed a bug introduced in [6f7f73b6] which entirely broke th1 rendering in skins. ... (file: [e21c2fb655] check-in: [7996a7940a] user: stephan branch: pikchr-th, size: 9021)
2020-09-13
23:38
Added th1 (enable_htmlify bool) command so that pikchr th1 code in th1Docs has a way of toggling that g.th1Flag off and on. ... (file: [0c5ea8884c] check-in: [6f7f73b6af] user: stephan branch: pikchr-th, size: 8988)
21:23
Centralized handling of the TH_INIT_NO_ENCODE (formerly NO_ESC) flag in sendText(). ... (file: [ca63d56947] check-in: [b95861fb8a] user: stephan branch: pikchr-th, size: 8868)
19:40
Undid part of [dd4b87c0] which was just plain broken. Yes, we do need TH_INIT_NO_ESC, or something similar, to avoid puts HTML-escaping our pikchr quotes. ... (file: [d9be14d4a8] check-in: [a5eaa0661e] user: stephan branch: pikchr-th, size: 8865)
19:35
Renamed -th-nopic to -th-nosvg because nopic should arguably be nopik, but nopik looks/feels like a typo :/. #FirstWorldProblems ... (file: [1b17a27f2d] check-in: [80f7c6c025] user: stephan branch: pikchr-th, size: 8869)
18:42
It seems we might not need the new TH1_INIT_NO_ESC flag so long as we're just really careful with how we use puts. ... (file: [b881b7d174] check-in: [dd4b87c0bc] user: stephan branch: pikchr-th, size: 8834)
18:26
Found a workaround for the th1 puts escaping, but am still wondering whether it's a viable long-term solution. ... (file: [3354bae872] check-in: [18abb60d42] user: stephan branch: pikchr-th, size: 8830)
16:35
Initial work on a pikchr CLI command which integrates TH1 for programmatic pikchr generation. DO NOT MERGE: the required changes to TH1 need more testing to ensure they do not introduce fallout in the skin output. Also, output redirection is still very imcomplete and TH1 error reporting does not yet do the right thing. ... (file: [782f046f14] check-in: [8a4304eae2] user: stephan branch: pikchr-th, size: 8470)
00:50
pikchrshow: added 'p' as alias for 'content' URL parameter in the interest of simplifying linking directly to small scripts from the pikchr user manual. ... (file: [1ad036884f] check-in: [a34e88e007] user: stephan branch: trunk, size: 5917)
2020-09-12
07:14
Added support for pikchr 'indent' alignment and expanded the fossil.dom.checkbox/radio() methods. ... (file: [48d67851d2] check-in: [57c7128b95] user: stephan branch: trunk, size: 5784)
06:13
Added style_emit_noscript_for_js_page() to emit a NOSCRIPT tag and an error message if JS is not available, and call it from the pages which *required* JS in order to work. Added a note about potential browser-induced SVG blurring when using the pikchrshow dark mode option. ... (file: [1fe0fae98f] check-in: [070716d835] user: stephan branch: trunk, size: 5778)
05:41
pikchrshow: discovered that Firefox cannot flexbox a LEGEND element properly, so worked around that. ... (file: [323dc1f8b2] check-in: [c92ff2daef] user: stephan branch: trunk, size: 5758)
04:33
Work on the pikchrshow drag/drop handling. ... (file: [a1e920ddda] check-in: [3ffd3be3dc] user: stephan branch: trunk, size: 5527)
03:34
pikchrshow: tapping the preview mode label now activates the neighboring copy button. ... (file: [e891116eda] check-in: [3e10ece71e] user: stephan branch: trunk, size: 5470)
02:58
Simplified pikchrshow markup alignment selection to a single checkbox. Related CSS/layout tweaks. ... (file: [e5c0cb74ef] check-in: [240646ef7d] user: stephan branch: trunk, size: 5592)
00:46
pikchrshow: moved markup alignment selection into the fieldset legend and only show it when the preview is showing one of the markup types. ... (file: [dc8d21ead0] check-in: [be99269dc3] user: stephan branch: trunk, size: 5339)
00:09
Updated /pikchrshow help and changes.wiki to mention pikchr. ... (file: [b65565dddd] check-in: [bb31279a19] user: stephan branch: trunk, size: 5205)
2020-09-11
23:56
Rearranged the pikchrshow controls a bit to make better use of space and reduce flickering of the preview mode label/controls. Adapted CSS for pikchr error reporting structure changes. Code renaming for consistency/clarity. fossil.copyButton() click handler is now a no-op if the pseudo-button element has the 'disabled' CSS class and added style to grey such a button out. ... (file: [24ecce7c3a] check-in: [c304b4ffdf] user: stephan branch: trunk, size: 5158)
22:24
pikchrshow: saved some space in the button bar and added help buttonlets to explain its two checkboxes. ... (file: [c5f222a4a6] check-in: [7ddd2781a0] user: stephan branch: trunk, size: 5215)
21:56
pikchrshow: drag/drop pikchr text files into the textarea. Added a selection list of test/demo scripts which currently includes all of the test scripts from the pikchr repo. That increases the over-the-wire size to 8kb but it caches well. ... (file: [324ff0c922] check-in: [d4bb5251b3] user: stephan branch: trunk, size: 5178)
18:40
Fixed /pikchrshow layout at top/bottom, moved the UI controls to sit between the two main elements, and fixed the dark mode CSS selector broken by updates to pikchr's output. ... (file: [e0754024d0] check-in: [2dd0a40e59] user: stephan branch: trunk, size: 5118)
17:43
Pikchr-generated SVG uses "viewbox" instead of "width" and "height" in an effort to be more mobile-friendly. ... (file: [433c7550ec] check-in: [2defbdb3f4] user: drh branch: trunk, size: 5134)
00:06
Minor CSS and layout tweaks to /pikchrshow layout. Preview mode toggle is now disabled/enabled, rather than hidden/revealed, to help reduce UI jumpiness. ... (file: [619548c9cd] check-in: [2b556f1cc8] user: stephan branch: trunk, size: 5038)
2020-09-10
22:31
pikchrshow: support 4 different preview modes, clipboard copy of previewed content, and markup alignment option (left/center). ... (file: [37eff8971a] check-in: [d330c09135] user: stephan branch: trunk, size: 4870)
15:02
Added a small gap to the top of /pikchrshow's content area. ... (file: [701752acd7] check-in: [833dfc1bcd] user: stephan branch: pikchrshow, size: 4519)
13:59
Ajaxified pikchrshow. ... (file: [8516e67bc6] check-in: [075f6f8d80] user: stephan branch: pikchrshow, size: 4475)
07:31
pikchrshow: place rendering to the right of the entry form if it will fit, else wrap it around to below the form. ... (file: [6189bc5015] check-in: [91c13c34be] user: stephan branch: pikchrshow, size: 3420)
07:07
pikchrshow: always show the dark-mode checkbox but default to checked only in dark mode. Minor layout improvements. ... (file: [cf44186e43] check-in: [627ffe3cd8] user: stephan branch: pikchrshow, size: 3334)
05:36
pikchrshow: when running in a white-foreground skin, offer a checkbox to toggle the dark-theme simulation on and off (defaulting to on). Hide the checkbox for light skins. ... (file: [4219940fee] check-in: [72ac2b86a9] user: stephan branch: pikchrshow, size: 3144)
05:20
pikchrshow: when running under a skin with the white-foreground property, apply a CSS filter to the SVG to approximate a dark-theme look. ... (file: [aa8b724851] check-in: [c7d88f2754] user: stephan branch: pikchrshow, size: 2554)
2020-09-09
21:38
Added missing help docs to /pikchrshow. ... (file: [f1a5812136] check-in: [b46175c56f] user: stephan branch: pikchrshow, size: 2331)
21:16
Added missing new file :/. ... (file: [aecae181be] check-in: [cc68bc7bac] user: stephan branch: pikchrshow, size: 2196)