Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 6, 2024
2 parents 740aba3 + 98cf69f commit 55c6955
Show file tree
Hide file tree
Showing 69 changed files with 779 additions and 929 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
attributes:
label: Before submitting...
options:
- label: I upgraded to pagy version 8.0.1
- label: I upgraded to pagy version 8.0.2
required: true
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
Expand Down
9 changes: 4 additions & 5 deletions .github/chore-merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ gitGraph
branch master
checkout master
commit
commit
branch chore-1
checkout chore-1
commit id: "1"
commit id: "oldest"
checkout master
commit
commit
branch chore-2
checkout chore-2
commit id: "chore-2"
commit id: "newest"
checkout master
commit
cherry-pick id: "1"
cherry-pick id: "chore-2"
cherry-pick id: "oldest"
cherry-pick id: "newest"
```

(The graph above uses "cherry-pick" labels, but you can rebase if you want to.)
Expand Down
3 changes: 0 additions & 3 deletions .github/gemfiles/default
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ gem 'oj', require: false # false is for testing with or without it
gem 'rack'
gem 'rackup'
gem 'rake'
gem 'rake-manifest'

group :test do
gem 'activesupport'
Expand All @@ -29,6 +28,4 @@ group :apps do
gem 'puma'
gem 'sinatra'
gem 'sinatra-contrib'
# gem 'slim'
# gem 'haml'
end
17 changes: 16 additions & 1 deletion .github/latest_release_body.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,19 @@ If you wish to keep your favorites alive, please, [vote here](https://github.com
- Better frontend helpers
- New [Pagy Playground](https://ddnexus.github.io/pagy/playground/) to showcase, clone and develop pagy APPs without any setup on
your side (try the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app))
- See the [Changelog](https://ddnexus.github.io/pagy/changelog) for possible breaking changes
- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes

### Changes

<!-- changes start -->
- Minor change in rails app and RM run config
- Fix canonical gem root:
- Correct script.build: "NODE_PATH=\"$(bundle show 'pagy')/javascripts\"
- Move pagy.gemspec inside the gem root dir
- Fix for Turbo not intercepting changes in window.location
- Use require_relative for gem/lib files
- Complete translation of aria.nav for "ru" locale (close #599)
- Docs improvement and fixes
<!-- changes end -->

[CHANGELOG](https://ddnexus.github.io/pagy/changelog)
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/pagy-ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
name: Pagy CI

on:
workflow_dispatch:
push:
branches:
- '**'
branches: ['**']
pull_request:
branches: ['**']

jobs:

should_run:
name: Run or skip?
ruby_check:
name: Ruby Check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/*.md", "**/docs/**", "lib/config/pagy.rb", "LICENSE.txt"]'
paths: '["gem/lib/**", "gem/locales/en.yml", ".simplecov", ".rubocop", "Rakefile", "test/**", "tasks/**"]'
paths_ignore: '["**/*.md"]'
do_not_skip: '["workflow_dispatch", "schedule"]'


ruby_test:
needs: should_run
if: ${{ needs.should_run.outputs.should_skip != 'true' }}
needs: ruby_check
if: ${{ needs.ruby_check.outputs.should_skip != 'true' }}
name: Ruby ${{ matrix.ruby-version }} Test
runs-on: ubuntu-latest
strategy:
Expand All @@ -48,22 +47,35 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Check Rubocop compliance
run: bundle exec rubocop --format github

- name: Check Tests
run: bundle exec rake test

- name: Check Coverage # fails unless 100%
run: bundle exec rake check_coverage

- name: Check Rubocop compliance
run: bundle exec rubocop --format github

- name: Check gem manifest
run: bundle exec rake manifest:check

e2e_check:
name: E2E Check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths: '["gem/lib/**", "gem/locales/en.yml", "gem/javascripts/**", "e2e/**"]'
paths_ignore: '["**/*.md"]'
do_not_skip: '["workflow_dispatch", "schedule"]'

e2e_test:
needs: should_run
if: ${{ needs.should_run.outputs.should_skip != 'true' }}
needs: e2e_check
if: ${{ needs.e2e_check.outputs.should_skip != 'true' }}
name: E2E Test
runs-on: ubuntu-latest
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/.bundle/
/coverage/
node_modules/
/pkg/
/gem/pkg/
/tmp/
pnpm
.pnpm-debug.log
26 changes: 0 additions & 26 deletions .idea/runConfigurations/Coverage_Check.xml

This file was deleted.

5 changes: 1 addition & 4 deletions .idea/runConfigurations/Rails.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 0 additions & 46 deletions .idea/runConfigurations/Test.xml

This file was deleted.

12 changes: 6 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ AllCops:
TargetRubyVersion: 3.1
NewCops: enable
Exclude:
# '___' prefixed dirs are excluded
- ___*/**/*
# avoid Error: RuboCop found unsupported Ruby version 2.1 in `TargetRubyVersion` parameter
# (in vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/.rubocop.yml) and also the extra weird
# "Unable to find gem panolint; is the gem installed? Gem::MissingSpecError" in all ruby versions
- vendor/bundle/**/*
- pnpm/**/*
- "**/node_modules/**/*"
- coverage/**/*
- docs/**/*
- gem/lib/optimist.rb
- pnpm/**/*
- src/**/*
- vendor/**/* # fix the problem with github ruby

Layout/LineLength:
Max: 130
Expand Down
43 changes: 31 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: versions-24

## ⚠ WARNING

We may drop pagy's less used CSS extras.
We may drop pagy's less used CSS extras.

If you wish to keep them alive, please, [vote here](https://github.com/ddnexus/pagy/discussions/categories/survey).

Expand All @@ -28,9 +28,21 @@ If you upgrade from version `< 8.0.0` see the following:
None
<hr>

## Version 8.0.2

- Minor change in rails app and RM run config
- Fix canonical gem root:
- Correct script.build: "NODE_PATH="$(bundle show 'pagy')/javascripts"
- Move pagy.gemspec inside the gem root dir
- Fix for Turbo not intercepting changes in window.location
- Use require_relative for gem/lib files
- Complete translation of aria.nav for "ru" locale (close #599)
- Docs improvement and fixes

## Version 8.0.1

- Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything else).
- Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything
else).
- Fix broken link in README

## Version 8.0.0
Expand All @@ -44,28 +56,35 @@ None
- The `item_i18n_key` has been removed: pass the interpolated/pluralized value as the `item_name:` argument
- The `link_extra:` has been removed: its cumulative mechanism was confusing and error prone. The `:anchor_string` pagy
variable substitutes it, however it's not an helper argument anymore, so you can assign it as the `DEFAULT[:anchor_string]`
and/or pass it as any other pagy variable at object construction. (See [customize the link attributes](https://ddnexus.github.io/pagy/docs/how-to/#customize-the-link-attributes))
- HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets,
and/or pass it as any other pagy variable at object construction. (
See [customize the link attributes](https://ddnexus.github.io/pagy/docs/how-to/#customize-the-link-attributes))
- HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets,
templates or helper overrides. See the complete changes below if you notice any cosmetic changes or get some exception.
- The `navs` and `support` extras has been merged into the new [pagy extra](https://ddnexus.github.io/pagy/docs/extras/pagy).
Search for `"extra/navs"` and
- The `navs` and `support` extras has been merged into the new [pagy extra](https://ddnexus.github.io/pagy/docs/extras/pagy).
Search for `"extra/navs"` and
`"extras/support"` and replace with `"extras/pagy"` (remove the duplicate if you used both)
- The build path for javascript builders has moved from the `lib` to the `gem` dir so the correct setup in `package.json` is:
`build: "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" <your original command>"`
- The build path for javascript builders has been updated to the canonical paths for gems, and has moved from the `lib` to
the gem root. Notice that the correct setup in `package json` was still wrongly wrapped in the `gem` dir for 8.0.0-8.0.1, and it
has finally been fixed in 8.0.2 (sorry for that):
- 8.0.0-8.0.1 only: `build: "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" <your original command>"`
- 8.0.2+: `build: "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" <your original command>"`

### Changes

- Streamlined HTML and CSS helper structure. You may want to look at the actual output by running the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app)
- Streamlined HTML and CSS helper structure. You may want to look at the actual output by running
the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app)
- The `pagy_nav` and `pagy_nav_js` helpers output a series of `a` tags inside a wrapper `nav` tag (nothing else)
- The disabled links are so because they are missing the `href` attributes. (They also have the `role="link"` and `aria-disabled="true"` attributes)
- The disabled links are so because they are missing the `href` attributes. (They also have the `role="link"`
and `aria-disabled="true"` attributes)
- The `current` and `gap` classes are assigned to the specific `a` tags
- HTML changes
- All the pagy helper root classes have been changed according to the following rule. For example:
- `"pagy-nav"` > `"pagy nav"`
- `"pagy-bootstrap-nav-js"` > `"pagy-bootstrap nav-js"`
- and so on for all the helpers
- The `active` class of the `*nav`/`*nav_js` links as been renamed as `current`
- The `disabled`, `prev`, `next` and `pagy-combo-input` link classes have been removed (see the [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/#pagy-scss) for details)
- The `disabled`, `prev`, `next` and `pagy-combo-input` link classes have been removed (see
the [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/#pagy-scss) for details)
- The `rel="prev"` and `rel="next"` attributes have been dropped (they are obsolete)
- The `<label>`/`</label>` and `<b>`/`</b>` wrappers in the dictionary files have been removed
- The `pagy_link_proc` method (only used internally or in your custom overriding) has been renamed to `pagy_anchor` and it works
Expand All @@ -83,7 +102,7 @@ None
- The [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/) are a lot simpler as a consequence of the changes above
- All the `*combo-nav_js` of the framework extras use simpler structure and improve the look and feel consistently with their
respective frameworks
- All the frontend extra have been normalized and are totally consistent with each other; a few may add the `classes:`
- All the frontend extra have been normalized and are totally consistent with each other; a few may add the `classes:`
argument to a few components, when the framework allows it.
- Created the [pagy playground](https://ddnexus.github.io/pagy/playground) system of apps working with the `pagy` executable.
- Internal renaming `FrontendHelpers` > `JSTools`
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ group :test do
gem 'oj', require: false # false is for testing with or without it
gem 'rack'
gem 'rackup'
gem 'rake-manifest'
gem 'rematch'
gem 'rubocop'
gem 'rubocop-minitest'
Expand All @@ -33,7 +32,6 @@ group :apps do
gem 'rouge'
gem 'sinatra'
gem 'sinatra-contrib'
gem 'slop'
end

group :performance do
Expand Down
Loading

0 comments on commit 55c6955

Please sign in to comment.