Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/retext-spell-6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arebra authored Feb 25, 2025
2 parents cf5ac0c + f7a156b commit 3213bd7
Show file tree
Hide file tree
Showing 39 changed files with 18,523 additions and 13,291 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
with:
fetch-depth: 0

- uses: gittools/actions/gitversion/setup@v0.10.2
- uses: gittools/actions/gitversion/setup@v3.1.11
with:
versionSpec: '5.x.x'

- id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
uses: gittools/actions/gitversion/execute@v3.1.11

- name: Generate variables
id: variables
Expand All @@ -42,7 +42,7 @@ jobs:
GITHUB_ACTOR_EMAIL: [email protected]
GITHUB_REPO: https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
run: |
docker-compose run \
docker compose run \
-e GITHUB_REPOSITORY_URL=${{ needs.variables.outputs.repository_url }} \
jekyll deploy \
--env=production
4 changes: 2 additions & 2 deletions .github/workflows/gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
with:
fetch-depth: 0

- uses: gittools/actions/gitversion/setup@v0.10.2
- uses: gittools/actions/gitversion/setup@v3.1.11
with:
versionSpec: '5.x.x'

- id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
uses: gittools/actions/gitversion/execute@v3.1.11

- name: Generate variables
id: variables
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
with:
fetch-depth: 0

- uses: gittools/actions/gitversion/setup@v0.10.2
- uses: gittools/actions/gitversion/setup@v3.1.11
with:
versionSpec: '5.x.x'

- id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
uses: gittools/actions/gitversion/execute@v3.1.11

- name: Generate variables
id: variables
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
cond: ${{ github.event_name == 'pull_request' }}
if_true: github-pr-review
if_false: github-check
- uses: reviewdog/action-remark-lint@v5.8
- uses: reviewdog/action-remark-lint@v5.16
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: ${{ steps.reporter.outputs.value }}
Expand All @@ -119,7 +119,7 @@ jobs:
# - uses: actions/checkout@v4
# - name: deploy dry-run
# run: |
# docker-compose run \
# docker compose run \
# jekyll deploy \
# --env=production \
# --dry-run
Expand Down
124 changes: 43 additions & 81 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-02-10 17:04:48 UTC using RuboCop version 1.44.1.
# on 2024-03-26 11:13:57 UTC using RuboCop version 1.62.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -9,30 +9,28 @@
# Offense count: 1
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
# SupportedStyles: Gemfile, gems.rb, gemspec
# AllowedGems: bundler
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
Gemspec/DevelopmentDependencies:
Exclude:
- 'spec/fixture/Gemfile'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
Exclude:
- 'swedbank-pay-design-guide-jekyll-theme.gemspec'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'swedbank-pay-design-guide-jekyll-theme.gemspec'

# Offense count: 5
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/sidebar_after_payment_spec.rb'
- 'spec/sidebar_checkin_file_spec.rb'
- 'spec/sidebar_front_page_spec.rb'
- 'spec/sidebar_super_secret_file_spec.rb'

# Offense count: 6
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
# Offense count: 7
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 29

Expand All @@ -42,12 +40,12 @@ Metrics/ClassLength:
Max: 135

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 9

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 10

Expand All @@ -68,78 +66,35 @@ RSpec/ContextWording:
- 'spec/spec_helper.rb'

# Offense count: 3
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Exclude:
- '**/spec/features/**/*'
- '**/spec/requests/**/*'
- '**/spec/routing/**/*'
- '**/spec/system/**/*'
- '**/spec/views/**/*'
- 'spec/card_checkout_core_features_spec.rb'
- 'spec/card_overview_spec.rb'
- 'spec/sidebar_spec.rb'

# Offense count: 25
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 25

# Offense count: 16
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Enabled: false
Exclude:
- 'spec/read_time_filter_spec.rb'
- 'spec/regex_capture_filter.spec'
- 'spec/rspec_description_parser_spec.rb'

# Offense count: 15
# Offense count: 1
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/card_checkout_core_features_spec.rb'
- 'spec/card_overview_spec.rb'
- 'spec/sidebar_after_payment_spec.rb'
- 'spec/sidebar_checkin_file_spec.rb'
- 'spec/sidebar_checkout_core_features_file_spec.rb'
- 'spec/sidebar_checkout_more_file_spec.rb'
- 'spec/sidebar_features_file_spec.rb'
- 'spec/sidebar_front_page_spec.rb'
- 'spec/sidebar_index_file_spec.rb'
- 'spec/sidebar_po_file_spec.rb'
- 'spec/sidebar_redirect_file_spec.rb'
- 'spec/sidebar_resource_file_spec.rb'
- 'spec/sidebar_search_file_spec.rb'
- 'spec/sidebar_super_secret_file_spec.rb'
- 'spec/spec_helper.rb'

# Offense count: 2
RSpec/MultipleExpectations:
Max: 2
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- '**/spec/routing/**/*'
- 'spec/read_time_filter_spec.rb'
- 'spec/rspec_description_parser_spec.rb'

# Offense count: 43
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
# Offense count: 1
# Configuration parameters: Include.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/SpecFilePathSuffix:
Exclude:
- 'spec/card_checkout_core_features_spec.rb'
- 'spec/card_overview_spec.rb'
- 'spec/sidebar_after_payment_spec.rb'
- 'spec/sidebar_checkin_file_spec.rb'
- 'spec/sidebar_checkout_core_features_file_spec.rb'
- 'spec/sidebar_checkout_more_file_spec.rb'
- 'spec/sidebar_features_file_spec.rb'
- 'spec/sidebar_front_page_spec.rb'
- 'spec/sidebar_index_file_spec.rb'
- 'spec/sidebar_po_file_spec.rb'
- 'spec/sidebar_redirect_file_spec.rb'
- 'spec/sidebar_resource_file_spec.rb'
- 'spec/sidebar_search_file_spec.rb'
- 'spec/sidebar_spec.rb'
- 'spec/sidebar_super_secret_file_spec.rb'

# Offense count: 13
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 7
- 'spec/regex_capture_filter.spec'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Expand All @@ -149,15 +104,22 @@ Style/CaseEquality:
- 'lib/sidebar_html_builder.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedReceivers.
# AllowedReceivers: Thread.current
Style/HashEachMethods:
Exclude:
- 'spec/card_checkout_core_features_spec.rb'
- 'lib/sidebar_tree_builder.rb'

# Offense count: 8
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantCurrentDirectoryInPath:
Exclude:
- 'swedbank-pay-design-guide-jekyll-theme.gemspec'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 142
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,20 @@ like to host it locally on your computer, you have two options, manual install
or [Docker][docker].
The Docker installation is the one we recommend to use for its simplicity.

After either a Docker or manual installation Jekyll should be fired up with this theme. You can now add pages, documents,
data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, the site will regenerate and you should see
After either a Docker or manual installation Jekyll should be fired up with this theme. You can now add pages, documents, data, etc.
to test your theme's contents. As you make modifications to your theme and to your content, the site will regenerate and you should see
the changes in the browser after a refresh, just like normal.

When the theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled. To add a custom directory to your
theme-gem, please edit the regexp in `swedbankpay.gemspec` accordingly.


### Docker (recommended)

1. [Clone this repository][clone].
2. [Install Docker Personal][docker]. Select default settings when prompted.
3. Open a console window at the root of the repository and run `docker-compose up`.
This will create a docker container and spin it up with everything that's specified in the repository gemfile.
4. Open `http://localhost:4000` in a browser.


### Manual install

Expand All @@ -45,19 +43,17 @@ theme-gem, please edit the regexp in `swedbankpay.gemspec` accordingly.
that.
Note: If you're installing on Windows, choose Ruby+Devkit Installers.
4. Open VSC and open the repository
5. Verify that Git is installed by running `git status` in VSC terminal.
5. Verify that Git is installed by running `git status` in VSC terminal.
If Git is not properly installed, you will see an error message like the one below. Just [download Git][git] and install.
![Alt text](image.png)
6. Type `bundle install` inside the root folder of this repository.
7. Run `bundle exec jekyll serve` to start the website.
8. Open in a browser.


### Visual Studio Code plugins

You might want to install plugins for Graphviz, JSON, Liquid, Markdown and Mermaid as this will enhance your coding experience.


## Contributing

Bug reports and pull requests are welcome on [GitHub][github]. This project is
Expand All @@ -82,15 +78,11 @@ agreement][cla].
[design-guide]: <https://design.swedbankpay.com/>
[developer-portal]: <https://developer.swedbankpay.com/>
[docker]: <https://www.docker.com/>
[gems]: <https://rubygems.org/>
[git]: <https://git-scm.com/downloads>
[github]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme>
[graphviz]: <https://graphviz.org/download/>
[license-badge]: https://img.shields.io/github/license/SwedbankPay/swedbank-pay-design-guide-jekyll-theme
[license]: <https://opensource.org/licenses/MIT>
[liquid]: <https://jekyllrb.com/docs/liquid/>
[opengraph-image]: <https://repository-images.githubusercontent.com/209270355/36818080-53ee-11ea-896c-082addb851a6>
[ruby]: <https://rubyinstaller.org/downloads/archives>
[swedbankpay]: <https://swedbankpay.github.io/swedbank-pay-design-guide-jekyll-theme/>
[test-badge]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/workflows/Test/badge.svg>
[vsc-ruler]: <https://stackoverflow.com/questions/29968499/vertical-rulers-in-visual-studio-code>
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ opengraph:
image: /image1.png
design_guide:
base_url: https://design.swedbankpay.com
version: 10.9.1
version: 10.10.1
search:
enabled: true
url: /search
Expand Down
25 changes: 20 additions & 5 deletions _includes/accordion-table.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
{%- comment -%}
**Parameters
content(required): What will be displayed inside the accordion when expanded.
header_collapse_text: Text to display on the collapse header. If not supplied the text 'Hide fields' will be used.
header_collapse_css: CSS class to apply to the text on the collapse header. If not supplied default style will be used.
header_expand_text: Text to display on the expand header. If not supplied the text 'Show fields' will be used.
header_expand_css: CSS class to apply to the text on the expand header. If not supplied default style will be used.
accordion_id: Id of the accordion. If not supplied 'accordion-1' will be used.
{%- endcomment -%}

{% assign content = include.content | markdownify%}
{% assign accordion_id = include.accordion_id | default: 'accordion-1' %}
{% assign header_collapse_text = include.header_collapse_text | default: 'Hide fields'%}
{% assign header_collapse_css = include.header_collapse_css%}
{% assign header_expand_text = include.header_expand_text | default: 'Show fields'%}
{% assign header_expand_css = include.header_expand_css%}

<div class="accordion">
<button type="button" class="accordion-header" aria-expanded="false" aria-controls="exp-1">
<span class="mr-3 show">Show fields</span>
<span class="mr-3 hide">Hide fields</span>
<button type="button" class="accordion-header" aria-expanded="false" aria-controls="{{accordion_id}}">
<span class="mr-3 show {{header_expand_css}}">{{header_expand_text}}</span>
<span class="mr-3 hide {{header_collapse_css}}">{{header_collapse_text}}</span>
</button>
<div class="accordion-body" id="exp-1">
<div class="accordion-body" id="{{accordion_id}}">
{{ content }}
</div>
</div>
</div>
3 changes: 1 addition & 2 deletions _includes/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
{% assign header = include.header | markdownify | remove: '<p>' | remove: '</p>' | strip %}
{% assign body = include.body | markdownify | remove: '<p>' | remove: '</p>' | strip %}

<div
class="alert {{ type_class }}">
<div class="alert {{ type_class }}">
{% if icon != blank and icon != empty and icon != nil %}
<i class="material-icons alert-icon mr-3">{{ icon }}</i>
{% endif %}
Expand Down
23 changes: 23 additions & 0 deletions _includes/code-example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{%- comment -%}
**Parameters
title: Title
header: header content
json: json content
{%- endcomment -%}

<p class="code-view-header">
{{ include.title}}
{% if include.json %}
<button aria-describedby="tooltipCopy" class="code-view-copy tooltip" aria-label="Copy json to clipboard" value='{{include.json}}' onclick='javascript:navigator.clipboard.writeText(this.value)'><i class="at-clipboard small" aria-hidden="true"></i><div role="tooltip">Copy json to clipboard</div></button>
{% endif %}
</p>
{% if include.header %}
````http
{{include.header}}
````
{% endif %}
{% if include.json %}
````jsonc
{{include.json}}
````
{% endif %}
Loading

0 comments on commit 3213bd7

Please sign in to comment.