Skip to content

docs: restructure the README and add a License section - #58

Merged
Fivell merged 3 commits into
masterfrom
docs/readme-structure
Oct 1, 2026
Merged

Fivell merged 3 commits into
masterfrom
docs/readme-structure

Conversation

@Fivell

@Fivell Fivell commented Oct 1, 2026

Copy link
Copy Markdown
Member

Documentation only — no code, no gemspec, no version change.

Structure

Every section heading was an #, so the page carried six H1s next to the title and then jumped straight to ###, skipping H2 entirely. Sections are ## now and the FAQ entries stay ###. Added a table of contents: the file is ~390 lines with ten FAQ entries and nothing to navigate by.

Fenced code blocks

The file had an odd number of fence lines — authenticity_token and batch_action were wrapped in triple backticks inline, which opens a block as far as a Markdown parser is concerned. They are single backticks now. Every block also declares a language; the bare ones became sh, text or scss.

Two samples were wrong, not just unformatted

  • render nothing: true (two occurrences) has not worked since Rails 5.1 — :nothing is not handled anywhere in actionpack 8.1, I checked the gem source. Replaced with head, keeping location: where it was used, since the plugin JS reads that header to decide where to go after the action.
  • The "Example in JavaScript" block was CoffeeScript ($.post(url, form_data).always () ->) inside a ```javascript fence.

Smaller things

  • both screenshots had the alt text Step 1
  • the HTTP contract for a custom pop-up (method / URL / query string) was three loose prose lines, now a table
  • typos: usefull, parform, "you pop-up form", "integer(of float)", a double space
  • one duplicated confirm_submit: true example dropped — the identical snippet appears at the top of the same section

Added

A ## License section pointing at LICENSE.txt. The gemspec already declares spec.license = "MIT" and GitHub detects MIT, but the README never said so.

Checked

  • all 16 TOC links resolve to existing anchors, and no section is missing from the TOC
  • all three image paths exist in screenshots/
  • LICENSE.txt exists and starts with "The MIT License (MIT)"
  • every code block from the previous README is still present, except the duplicate named above

Fivell added 3 commits October 1, 2026 22:31
Heading levels: every section was an `#`, so the page had six H1s next to the
title and then jumped straight to `###`. Sections are now `##` and the FAQ
entries stay `###`, which also makes the anchors stable. Added a table of
contents -- the file is ~390 lines with ten FAQ entries.

Fenced code blocks: the file had an odd number of fence lines, because
`authenticity_token` and `batch_action` were wrapped in triple backticks
inline. They are single backticks now, and every block declares a language
(sh/text/scss where it was bare).

Two code samples were wrong rather than merely unformatted:

* `render nothing: true` has not worked since Rails 5.1 -- `:nothing` is not
  handled anywhere in actionpack 8.1. Both occurrences are now `head`, keeping
  the `location:` where it was used, since the plugin's JS reads that header.
* the "Example in JavaScript" block was CoffeeScript (`.always () ->`) inside a
  ```javascript fence.

Also: both screenshots had the alt text "Step 1"; the HTTP contract for a
custom pop-up was three loose prose lines and is now a table; typos (usefull,
parform, "you pop-up form", "integer(of float)"); and one duplicated
`confirm_submit: true` example was dropped -- the same snippet appears at the
top of that section.

No prose was removed beyond that duplicate.
Supported form field types: `checkbox` was missing from the list. The dialog
accepts it -- dialog_mass_fields_update.js tests /^(datepicker|checkbox|text)$/
-- and the selectbox case is an Array of options, which the sentence did not
say either.

Counting: "Without :confirm_summary nothing is counted" was wrong. When
:confirm_submit is set, resource_extension.rb always fills
confirm_submit_summary and the JS falls back to it, so the count request is
made for :confirm_submit alone. The repo's own specs rely on this -- the posts
resource in spec/support/admin.rb sets only :confirm_submit and
posts_actions_spec.rb asserts the summary appears.
The paragraph said the amount is requested when the dialog opens, which is only true for :confirm_summary. With :confirm_submit the request goes out when OK is pressed and the second step appears, and not at all when no field is checked. Setting both options still makes one request, not two -- :confirm_submit takes over and :confirm_summary only supplies the wording. Measured by counting the scoped_collection_records_count requests reaching the controller.
@Fivell
Fivell merged commit 4ff30a4 into master Oct 1, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant