Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rails/tailwindcss-rails
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.5.0
Choose a base ref
...
head repository: rails/tailwindcss-rails
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.6.0
Choose a head ref
  • 16 commits
  • 14 files changed
  • 4 contributors

Commits on Apr 29, 2024

  1. Increase form input field border contrast

    The contrast provided by the border-gray-200 Tailwind utility
    class is very poor. It's nearly impossible to distinguish the edges 
    of an input field on a white background. 
    
    That's not a great default experience for Rails scaffolds.
    
    With a slight bump to border-gray-400, things are much easier 
    to distinguish.
    olivierlacan authored Apr 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e9c3f80 View commit details

Commits on Apr 30, 2024

  1. dev: get dependabot updates for gems and github actions

    flavorjones committed Apr 30, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    6208f90 View commit details
  2. fix location of dependabot.yml

    flavorjones committed Apr 30, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    5a5e395 View commit details

Commits on May 1, 2024

  1. generator: sync erb template

    This updates the erb template to be in sync with the template in rails/rails
    kinsomicrote authored and flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    a64b7a4 View commit details
  2. Merge pull request #357 from kinsomicrote/341-sync-erb-template

    generator: sync erb template
    flavorjones authored May 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b6cb812 View commit details
  3. dev: remove attempt at dependabot grouping

    flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    d896e95 View commit details
  4. build(deps): bump actions/download-artifact from 3 to 4

    Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
    - [Release notes](https://github.com/actions/download-artifact/releases)
    - [Commits](actions/download-artifact@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/download-artifact
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored May 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    95ffac7 View commit details
  5. dep: drop support for Rails 6.0

    which reached EOL 11 months ago, in June 2023
    flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    1fc0541 View commit details
  6. build(deps): bump actions/upload-artifact from 3 to 4

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored and flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    1c7e4dc View commit details
  7. Merge pull request #358 from rails/flavorjones-dep-drop-rails-6.0-sup…

    …port
    
    dep: drop support for Rails 6.0
    flavorjones authored May 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    29189bd View commit details
  8. Merge pull request #361 from rails/dependabot/github_actions/actions/…

    …download-artifact-4
    
    build(deps): bump actions/download-artifact from 3 to 4
    flavorjones authored May 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d05daf4 View commit details
  9. generator: sync erb template to use Rails 7.0 APIs

    This updates the erb template to be in sync with the template in rails/rails
    kinsomicrote authored and flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    9412854 View commit details
  10. dep: drop feature and bugfix support for Rails 6.1

    We will still provide security support for the previous minor release
    while Rails 6.1 is supported.
    flavorjones committed May 1, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    3bf5cb9 View commit details

Commits on May 2, 2024

  1. Merge pull request #359 from rails/update-templates-to-rails-7.0

    generator: sync erb template to use Rails 7.0 APIs
    flavorjones authored May 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc22bca View commit details

Commits on May 3, 2024

  1. Merge pull request #356 from olivierlacan/patch-1

    Increase form input field border contrast
    flavorjones authored May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fe75869 View commit details

Commits on May 4, 2024

  1. version bump to v2.6.0

    flavorjones committed May 4, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    flavorjones Mike Dalessio
    Copy the full SHA
    ec27257 View commit details
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -33,24 +33,6 @@ jobs:
- name: Run tests
run: bin/test

rails6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler: latest
- name: "Pin to Rails 6.1"
run: |
bundle remove actionmailer
bundle add actionmailer --version "~> 6.1" --skip-install
bundle add railties --version "~> 6.1" --skip-install
bundle install
- name: Run tests
run: bin/test

user-journey:
strategy:
fail-fast: false
18 changes: 9 additions & 9 deletions .github/workflows/gem-install.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
bundler: latest
bundler-cache: true
- run: "bundle exec rake gem:${{matrix.platform}}"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: gem-${{matrix.platform}}
path: pkg
@@ -43,7 +43,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-ruby
path: pkg
@@ -57,7 +57,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-x86_64-linux
path: pkg
@@ -70,7 +70,7 @@ jobs:
container:
image: ruby:3.2-alpine
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-x86_64-linux
path: pkg
@@ -83,7 +83,7 @@ jobs:
needs: ["package"]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-arm-linux
path: pkg
@@ -103,7 +103,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-x86_64-darwin
path: pkg
@@ -117,7 +117,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-arm64-darwin
path: pkg
@@ -131,7 +131,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-x64-mingw32
path: pkg
@@ -145,7 +145,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem-x64-mingw-ucrt
path: pkg
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v2.6.0 / 2024-05-04

* Increase form input field border contrast. (#356) @olivierlacan
* Bring the scaffold templates up to date with rails/rails. (#357, #359) @kinsomicrote
* Drop support for Rails 6.0, which reached end-of-life in June 2023. (#358) @flavorjones
* Drop feature and bug fix support for Rails 6.1. The previous minor release will still receive security support while Rails 6.1 is supported. (#359) @flavorjones


## v2.5.0 / 2024-04-27

* Remove the `@tailwindcss/aspect-ratio` plugin from the `tailwind.config.js` that gets installed by the generator. This plugin was originally a polyfill until Safari 15 was released (in Fall 2021), and so is beyond its useful lifetime for anyone not targetting ancient browsers. (#344) @flavorjones @searls
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -5,5 +5,5 @@ gemspec
gem "debug", ">= 1.0.0"

group :test do
gem "actionmailer", ">= 6.0.0"
gem "actionmailer", ">= 7.0.0"
end
9 changes: 4 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
tailwindcss-rails (2.4.1)
railties (>= 6.0.0)
tailwindcss-rails (2.5.0)
railties (>= 7.0.0)

GEM
remote: https://rubygems.org/
@@ -82,7 +82,6 @@ GEM
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
@@ -125,7 +124,7 @@ GEM
rake (13.2.1)
rdoc (6.6.3.1)
psych (>= 4.0.0)
reline (0.5.3)
reline (0.5.4)
io-console (~> 0.5)
stringio (3.1.0)
thor (1.3.1)
@@ -142,7 +141,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
actionmailer (>= 6.0.0)
actionmailer (>= 7.0.0)
debug (>= 1.0.0)
tailwindcss-rails!

10 changes: 5 additions & 5 deletions lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
Original file line number Diff line number Diff line change
@@ -15,23 +15,23 @@
<div class="my-5">
<% if attribute.password_digest? -%>
<%%= form.label :password %>
<%%= form.password_field :password, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>

<div class="my-5">
<%%= form.label :password_confirmation %>
<%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<% if attribute.field_type == :text_area -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% elsif attribute.field_type == :check_box -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
<% else -%>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<% end -%>
<% end -%>
</div>
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@

<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>

<%%= link_to "Show this <%= human_name.downcase %>", @<%= singular_table_name %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>
Original file line number Diff line number Diff line change
@@ -3,12 +3,19 @@
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
<%% end %>

<%% content_for :title, "<%= human_name.pluralize %>" %>

<div class="flex justify-between items-center">
<h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
<%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
</div>

<div id="<%= plural_table_name %>" class="min-w-full">
<%%= render @<%= plural_table_name %> %>
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
<%%= render <%= singular_table_name %> %>
<p>
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</p>
<%% end %>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@

<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>

<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>
Original file line number Diff line number Diff line change
@@ -14,9 +14,4 @@
</p>

<% end -%>
<%% if action_name != "show" %>
<%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_name %>_path(<%= singular_name %>), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
<hr class="mt-6">
<%% end %>
</div>
Original file line number Diff line number Diff line change
@@ -6,10 +6,10 @@

<%%= render @<%= singular_table_name %> %>

<%%= link_to "Edit this <%= singular_table_name %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<div class="inline-block ml-2">
<%%= button_to "Destroy this <%= singular_table_name %>", <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
</div>
<%%= link_to "Back to <%= plural_table_name %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>
</div>
2 changes: 1 addition & 1 deletion lib/tailwindcss/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Tailwindcss
VERSION = "2.5.0"
VERSION = "2.6.0"
end
2 changes: 1 addition & 1 deletion tailwindcss-rails.gemspec
Original file line number Diff line number Diff line change
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables << "tailwindcss"

spec.add_dependency "railties", ">= 6.0.0"
spec.add_dependency "railties", ">= 7.0.0"
end