Skip to content

Commit

Permalink
phoenix_html v4 compatibility (#130)
Browse files Browse the repository at this point in the history
* Don't depend on Phoenix.HTML.Tag.content_tag in Showcase

* Don't depend on Phoenix.HTML.Tag.content_tag in Heading

* Copy-paste "humanize" for default labels

* Run tests with unlocked deps on CI

* Don't depend on Phoenix.HTML.Form.label

* Don't depend on Phoenix.HTML.Form.input

* Don't depend on Phoenix.HTML.Form.select

* Don't depend on Phoenix.HTML.Form.textarea

* Fix credo warnings

* Improve documentation

* Define phoenix_html dependency

* Ensure Phoenix.Component.to_form is available

* Documentation fixes

* Add changelog entry

* Copy over default values from core components

* Remove private render_input func

* Use sigil_H instead of copy of content_tag

* Rename label and input to avoid name clashes

* Update changelog
  • Loading branch information
angelikatyborska authored Jul 18, 2024
1 parent e9d7e9b commit 4a7b7af
Show file tree
Hide file tree
Showing 8 changed files with 427 additions and 88 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ jobs:
- run: mix docs
- name: Check if versions showcase mix script finishes
run: mix run scripts/generate_version_showcase.ex

test-unlocked-deps:
runs-on: ubuntu-latest
name: unit (unlocked deps)
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: '25.1'
elixir-version: '1.14.5'
- run: mix deps.unlock --all
- run: mix deps.get
- run: mix test

demo:
runs-on: ubuntu-latest
name: demo
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Added support for phoenix_html `v4`. You can also continue using phoenix_html `v3`. To replace `Phoenix.HTML.Form` input helpers removed in phoenix_html `v4`, new components `ui_raw_input` and `ui_raw_label` were added.
- Added support for bitstyles `v5.0.0`. You can continue using bitstyles_phoenix with a lower bitstyles version, or migrate your codebase to bitstyles `v5.0.0`.

### How to migrate to bitstyles `v5.0.0`
Expand Down
2 changes: 1 addition & 1 deletion lib/bitstyles_phoenix.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ defmodule BitstylesPhoenix do
### Translating error messages
Generated phoenix apps usally come with a helper for [translating error messages](https://github.com/phoenixframework/phoenix/blob/496123b66c03c9764be623d2c32b4af611837eb0/installer/templates/phx_web/views/error_helpers.ex#L23-L46)
Generated phoenix apps usually come with a helper for [translating error messages](https://github.com/phoenixframework/phoenix/blob/496123b66c03c9764be623d2c32b4af611837eb0/installer/templates/phx_web/views/error_helpers.ex#L23-L46)
using `gettext`. This helper can be used to translate error messages rendered with `bitstyles_phoenix`.
In order to do so you can configure the generated helper or write your own with the MFA configuration.
Expand Down
Loading

0 comments on commit 4a7b7af

Please sign in to comment.