Skip to content

Commit

Permalink
Improve a few non-code files
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 10, 2024
1 parent ae71507 commit c5280f5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 34 deletions.
43 changes: 18 additions & 25 deletions .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
- type: markdown
attributes:
value: >
### Thank you for your bug report!
### 🙏 Thank you for your bug report!
Please, understand that code issues are reserved for real, reproducible pagy bugs.
Expand All @@ -17,7 +17,7 @@ body:
- type: checkboxes
id: prereq
attributes:
label: Before submitting...
label: 👀 Before submitting...
options:
- label: I upgraded to pagy version 8.1.0
required: true
Expand All @@ -31,50 +31,43 @@ body:
- type: markdown
attributes:
value: >
### IMPORTANT!
### IMPORTANT!
**The issue MUST provide a VALID code file confirming the bug AND complying with the list below
OR it will be automatically closed!**
#### 👍 VALID code files
#### VALID code files
- Edited copy of a single-file APP from the [Pagy Playground](https://ddnexus.github.io/pagy/playground)
- Link to a pagy fork containing an added test file
- A plain ruby file that can run as a single command like `ruby my_issue.rb`
_(without any other setup step, installation or guessing, and with no or minimal interaction required)_
#### 🚫 INVALID "code"
- Edited copy of a single-file APP from the [Pagy Playground](https://ddnexus.github.io/pagy/playground)
**Please, understand that we won't guess your issue out of some snippet or description,
and we won't install/setup/debug your partial or complete application.**
- Link to a pagy fork containing an added test file
- A plain ruby file that can run as a single command like `ruby my_issue.rb`
_(without any other setup step, installation or guessing, and with no or minimal interaction required)_
Avoid posting useless things like:
#### INVALID "code"
- Useless things like (but not limited to):
- Code snippets / Log transcripts
- Descriptions of errors / behaviors / expectations
- Rationalizations about WHY and WHAT you THINK it's a bug
- Rationalizations about WHY you THINK your problem is a pagy bug
- Multiple files / Setup instructions / Your partial or complete applications
- EVERYTHING other than the VALID code files we accept
Please, understand that we won't guess your environment/usage/configuration/conflicts out of some snippet
or description, nor clone/install/setup/debug your parial or complete application.
Please, start from a [pagy APP](https://ddnexus.github.io/pagy/playground/#pagy-apps)
and add just the minimum that makes it fail. It's a very simple process and, most of the times,
it will make your issue just "disappear". ;)
- and EVERYTHING other than the VALID code files listed above
Instead, start from a [pagy APP](https://ddnexus.github.io/pagy/playground/#pagy-apps),
add the smallest amount of code that exposes the bug and post it.
It's a very quick and simple process and, most of the times, it will make your issue just "disappear". ;)
_If anything is unclear to you, please ask for [support](https://github.com/ddnexus/pagy/discussions/categories/q-a).
We will be happy to help._
- type: checkboxes
id: support
attributes:
label: REQUIREMENTS
label: 🧐 REQUIREMENTS
options:
- label: I am providing a VALID code file that confirms the bug
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
- type: checkboxes
id: prereq
attributes:
label: Before submitting...
label: 👀 Before submitting...
options:
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
Expand Down
3 changes: 2 additions & 1 deletion docs/api/javascript/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ You need to debug the javascript helpers
* Large size
* It contains the source map to debug typescript
* It works only on new browsers
!!!

!!!

[!file](/gem/javascripts/pagy-dev.js)
+++
Expand Down
1 change: 0 additions & 1 deletion docs/api/pagy.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ totally skip the generation of page links in the frontend.

It can also return a simpler array without gaps if the passed `:size` is a single positive `Integer`. It may be a faster and
cleaner solution very useful in certain contexts (see the [Simple Nav](/docs/how-to.md#simple-nav))
!!!

==- `label`

Expand Down
10 changes: 6 additions & 4 deletions docs/extras/countless.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ extra item from the result, so deducing whether there is a `next` page or not wi

- The `@records` collection is an eager-loaded `Array` of records.
- The `@pagy` object can be used with any supported helper.
!!!
+++ Minimal mode

!!!
+++ Minimal mode

!!! success
Your app uses no or limited pagination UI
Expand Down Expand Up @@ -72,8 +73,9 @@ This mode is enabled by the `:countless_minimal` variable.

- The `@records` collection is a regular scope.
- The `@pagy` object cannot be used with any helpers.
- The collection is over when `@records.size < @pagy.vars[:items]`.
!!!
- The collection is over when `@records.size < @pagy.vars[:items]`

!!!

+++

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ If the `@pagy.count` in the example is `10_000`, the pages served without `:max_
`:max_pages: 50` pagy would serve only the first `50` pages of your collection.

That works at the `Pagy`/`Pagy::Countless` level, so it works with any combination of collection/extra, including `items`,
`gearbox` and search extras.
`gearbox` and search extras, however it makes no sense in `Pagy::Calendar` unit objects (which ignore it).

!!! Notice
The `items` and `gearbox` extras serve a variabe number of items per page. If your goal is limiting the pagination to a max number of records (instead of pages), you have to keep into account how you configure the `items` range.
Expand Down
2 changes: 1 addition & 1 deletion playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You have already activated GEMNAME v1, but your Gemfile requires GEMNAME v2.
Prepending `bundle exec` to your command may solve this.
```

If `bundle exec` doesn't solve it, then try `gem cleanup`.
If `bundle exec` doesn't solve it, then try `bundle update` and `gem cleanup`.

If after that you get into another error:

Expand Down

0 comments on commit c5280f5

Please sign in to comment.