Repository navigation
docs: restructure the README and add a License section - #58
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_tokenandbatch_actionwere 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 becamesh,textorscss.Two samples were wrong, not just unformatted
render nothing: true(two occurrences) has not worked since Rails 5.1 —:nothingis not handled anywhere in actionpack 8.1, I checked the gem source. Replaced withhead, keepinglocation:where it was used, since the plugin JS reads that header to decide where to go after the action.$.post(url, form_data).always () ->) inside a ```javascript fence.Smaller things
Step 1confirm_submit: trueexample dropped — the identical snippet appears at the top of the same sectionAdded
A
## Licensesection pointing atLICENSE.txt. The gemspec already declaresspec.license = "MIT"and GitHub detects MIT, but the README never said so.Checked
screenshots/LICENSE.txtexists and starts with "The MIT License (MIT)"