Skip to content

Web applications part 1 (Browser.sandbox) #730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Mar 18, 2025
Merged

Conversation

ceddlyburge
Copy link
Contributor

@ceddlyburge ceddlyburge commented Feb 22, 2025

Fixes #639

Replaces the previous draft PR #723 where there is a lot of discussion about how and what to do.

I'll do the introduction.mds from about once people are happy with it.

We could also add a css file so that it looks a bit nicer if you run it locally, but not sure if its worth it.

Still need to create introduction.mdonce about.md has been through review
Its numbers and not letters, but not too bad
Now it handles the case when the name of the primary file (src/Main.elm) doesn't match the solution name.
This is a good convention, but doesn't work for the web applications concept where the primary file must be called Main.elm to work with elm-test and elm-make and similar
Not sure it is going to work though
@jiegillet
Copy link
Contributor

jiegillet commented Mar 2, 2025

We could also add a css file so that it looks a bit nicer if you run it locally, but not sure if its worth it.

I don't think it's necessary, raw HTML looks good enough for this purpose. Plus, it would probably require to make assumptions about how the HTML is structured and stf.

@ceddlyburge
Copy link
Contributor Author

HI @jiegillet, I've responded to all your points now, can you take another look.
Thanks, Cedd

@jiegillet
Copy link
Contributor

I'll check again this weekend :)

Copy link
Contributor

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

Alright!
I'm good with the concept about.md, and the exercise. Which didn't prevent me from adding 6000 suggestions 🙇🙇🙇

I'm still not sold on elm-watch though, and I would like to have @mpizenberg's opinion (tagged on the relevant comment) if that's OK.

"elm/virtual-dom": "1.0.3"
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This elm.json is not identical to template/elm.json because of the missing newline, but it's not flagged because you swapped cmp for diff -w in the sanity check. Was that intentional?
I think it's best to keep the files exactly identical, it's just less noisy that way.

Also, in general I think it's good practice to always end file on a newline, but that's another thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentional, I wasn't able to make them the same. using cp didn't work, and my editor removes the new line if I try and do it manually. Maybe there is some crlf stuff going on as well. Anyway, I spent some time trying to get these the same and failed, and its irrelevant, so I think its probably better this way, as the same situation can happen to somebody else and its just wasting time for no benefit.

ceddlyburge and others added 2 commits March 8, 2025 19:48
@ceddlyburge
Copy link
Contributor Author

Hi @jiegillet, I've made those changes, apart from the one we are waiting on Matthieu for, one that wouldn't work (Debug.todo), and the whitespace issue for elm.json (where the juice isn't worth the squeeze).

@ceddlyburge
Copy link
Contributor Author

Hi @jiegillet , I don't think Matthieu is going to look at this, so we will have to decide ourselves. I think elm-watch is easier to use, and better (as it has hot reloading) and more idiomatic. Being as students will already be running the code locally in this case they will almost certainly have npm installed, and npx is bundled with npm, so I don't think we are really pushing any extra dependencies on students.

Copy link
Contributor

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

Ok, let's do it :)

I couldn't help myself, I made all the elm.json templates identical, I hope you don't mind. EDIT: welp, I am stumped, I didn't manage to do it, you were right they are identical locally, byte by byte, but exercises/concept/paulas-palindromes/elm.json is deemed to be different on CI. No clue why, I gave up.

Sorry for being so nitpicky, you really did a great job for this exercise.

All that's left in the intro file.

@ceddlyburge
Copy link
Contributor Author

I think the file must be different in the repo / on ci, but there is some nuance in the way git handles / stores the whitespace / line endings. I was also surprised that it wasn't fixable!

No worries about the nit picks. You make a lot of great points. I don't 100% agree with all of the comments, but I generally don't disagree enough to worry about it :)

@ceddlyburge ceddlyburge merged commit 0375ca5 into main Mar 18, 2025
6 checks passed
@ceddlyburge ceddlyburge deleted the web-applications-part-1 branch March 18, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concept - Web applications part 1
3 participants