go-blueprint icon indicating copy to clipboard operation
go-blueprint copied to clipboard

fix: input.css being public

Open arafays opened this issue 1 year ago • 3 comments

Problem

Closes #328 being /assets/css/input.css being publicly accessible when using tailwind with htmx

Description of Changes:

  • moved /assets/css/input.css to /styles/input.css this makes it explicit that these are styles and will not be included in assets

Checklist

  • [ x ] I have self-reviewed the changes being requested
  • [ x ] I have updated the documentation (check issue ticket #218)

arafays avatar Nov 28 '24 19:11 arafays

I also saw that when creating htmx project without tailwind no output.css file is being created. I did not change the code as I was unsure if that was the desired behaviour and if output.css will be the correct name for it as output.css felt not the right name for it.

arafays avatar Nov 28 '24 19:11 arafays

@mdelapenya If you have some time, can you check the issue that the linter caches?

Run cd gorilla-mux
Error: internal/database/database_test.go:27:3: undefined: testcontainers (typecheck)
		testcontainers.WithWaitStrategy(
		^
Error: Process completed with exit code 1.

Ujstor avatar Nov 29 '24 19:11 Ujstor

I dont know but I have a hunch if we just run the tests again manually they will pass :D

arafays avatar Nov 29 '24 19:11 arafays

I dont know but I have a hunch if we just run the tests again manually they will pass :D

I reran them twice, and they failed both times.

Ujstor avatar Nov 30 '24 15:11 Ujstor

I cloned this branch and tried to reproduce it locally and the CI error happens to me too: But it's not related to testcontainers, but in the previous step, the "build templates" one (see https://github.com/Melkeydev/go-blueprint/actions/runs/12074694415/job/33715796303?pr=345#step:7:22)

25l/ Preparing...- Preparing...\ Preparing...| Preparing.../ Preparing...- Preparing...25h1002l1003l2024/11/29 19:34:02 Problem creating files for project. open /home/runner/work/go-blueprint/go-blueprint/chi/cmd/web/styles/input.css: no such file or directory Error: open /home/runner/work/go-blueprint/go-blueprint/chi/cmd/web/styles/input.css: no such file or directory exit status 1

If you take a look at the Integration tests pipeline, they all pass.

mdelapenya avatar Dec 02 '24 09:12 mdelapenya

I think that shell script should exit the pipeline at the moment it fails, not continuing the workflow

mdelapenya avatar Dec 02 '24 09:12 mdelapenya

I cloned this branch and tried to reproduce it locally and the CI error happens to me too: But it's not related to testcontainers, but in the previous step, the "build templates" one (see https://github.com/Melkeydev/go-blueprint/actions/runs/12074694415/job/33715796303?pr=345#step:7:22)

25l/ Preparing...- Preparing...\ Preparing...| Preparing.../ Preparing...- Preparing...25h1002l1003l2024/11/29 19:34:02 Problem creating files for project. open /home/runner/work/go-blueprint/go-blueprint/chi/cmd/web/styles/input.css: no such file or directory Error: open /home/runner/work/go-blueprint/go-blueprint/chi/cmd/web/styles/input.css: no such file or directory exit status 1

If you take a look at the Integration tests pipeline, they all pass.

Well @mdelapenya thank you for pointing out where it was failing. I was able to fix the issue as the command go run main.go create -n chi -f chi -d postgres -g commit --advanced --feature tailwind was actually failing so the test were working correctly. can you tell me the process of how you run the tests locally (go noob here)? I couldn't find any documentation related to that.

arafays avatar Dec 02 '24 17:12 arafays

I usually check the pipeline/workflow file: https://github.com/Melkeydev/go-blueprint/blob/389802aa986d1be3b082e5ddf719d6fbff4bddd7/.github/workflows/ci.yml#L51

go test ./...

mdelapenya avatar Dec 02 '24 21:12 mdelapenya

just so you know it is fixed now @Ujstor @Melkeydev

arafays avatar Dec 06 '24 21:12 arafays

I also saw that when creating htmx project without tailwind no output.css file is being created. I did not change the code as I was unsure if that was the desired behaviour and if output.css will be the correct name for it as output.css felt not the right name for it.

We implemented just a barebone example without CSS, but we could add custom, simple CSS. For now, I am accepting the current implementation, and you could open another PR if you are interested.

Ujstor avatar Dec 16 '24 17:12 Ujstor