Skip to content

Conversation

@ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Oct 28, 2025

Changes

Use Prima for /sites page invitation modal.

Tests

  • Automated tests have been added

Changelog

  • This PR does not make a user-facing change

Dark mode

  • The UI has been tested both in dark and light mode
@github-actions
Copy link

Preview environment👷🏼‍♀️🏗️
PR-5843
"ref_inspector": {:hex, :ref_inspector, "2.0.0", "f3e97e51d9782de4c792f56eed26c80903bc39174c878285392ce76d5e67fe98", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:yamerl, "~> 0.7", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "bf62f3f1a87d6b8b30f457a480668f965373e64f184611282b5e89d8dd81fd33"},
"referrer_blocklist": {:git, "https://github.com/plausible/referrer-blocklist.git", "d6f52c225cccb4f04b80e3a5d588868ec234139d", []},
"req": {:hex, :req, "0.5.6", "8fe1eead4a085510fe3d51ad854ca8f20a622aae46e97b302f499dfb84f726ac", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 2.0.6 or ~> 2.1", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "cfaa8e720945d46654853de39d368f40362c2641c4b2153c886418914b372185"},
"rustler": {:hex, :rustler, "0.37.1", "721434020c7f6f8e1cdc57f44f75c490435b01de96384f8ccb96043f12e8a7e0", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "24547e9b8640cf00e6a2071acb710f3e12ce0346692e45098d84d45cdb54fd79"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid that dependency by making it test/dev only in upstream repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see it's used for the code-block component but the syntax highlighter dependency also marked as optional, hm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree. Autumn and rustler should not be included in the library.

There's also another related problem. This compilation warning when used as a dependency:

==> prima
Compiling 5 files (.ex)
    warning: PrimaWeb.Endpoint.config_change/2 is undefined (module PrimaWeb.Endpoint is not available or is yet to be defined)
    │
 27 │       PrimaWeb.Endpoint.config_change(changed, removed)
    │                         ~
    │
    └─ lib/prima/application.ex:27:25: Prima.Application.config_change/3

Basically I haven't figured out a clean separation between packaging prima for library vs the demo application.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be OK to put the demo application under example/ or demo/ with its own root.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aerosol Can you elaborate what you mean?

Copy link
Contributor

@zoldar zoldar Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for butting in - but what I think he means is that the demo application can be put in a subdirectory in project's root, like "<project_root>/example" and be a completely separate app created with "mix new ...". In the demo app's mix.exs, "prima" can be added as a dependency via relative path, like:

  defp deps do
    [
      {:prima, path: "..", override: true},
      # ....
    ]

with all other demo-specific depedencies, completely separate from the library.

Ecto (among others) uses a pattern like this:

https://github.com/elixir-ecto/ecto/tree/master/examples/friends

@zoldar
Copy link
Contributor

zoldar commented Oct 29, 2025

image

The buttons don't seem to align properly in mobile view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants