Skip to content

Conversation

@Berserker66
Copy link
Member

What is this fixing or adding?

Removes remaining CDN use, which means people with default uMatrix config can use the sites now, and in fact JS in general is not needed, allowing noscript users to also view the pages. As a result, I consider this a bugfix.

How was this tested?

locally

If this makes graphical changes, please attach screenshots.

Hopefully not, I didn't notice anything at least.

@Berserker66 Berserker66 added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Oct 20, 2024
@github-actions github-actions bot added the affects: webhost Issues/PRs that touch webhost and may need additional validation. label Oct 20, 2024
@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Oct 20, 2024
@black-sliver
Copy link
Member

black-sliver commented Oct 23, 2024

I would honestly prefer to not merge/deploy this for 0.5.1 because this change might "break" apworlds and that would possibly either delay 0.5.1 further or leave apworld devs in a bad spot.

…_remaining_markdown

# Conflicts:
#	WebHostLib/misc.py
#	WebHostLib/static/assets/gameInfo.js
#	WebHostLib/static/assets/tutorial.js
#	WebHostLib/templates/gameInfo.html
#	WebHostLib/templates/tutorial.html
…es instead of spaces appearing in the titles
@Berserker66
Copy link
Member Author

Huh, the unittests pass just fine for me locally.

@qwint
Copy link
Collaborator

qwint commented Apr 6, 2025

tests are still failing due to what looks like a similar initialization issue which from some local testing (read: deleting /WebHostLib/static/generated) the entire /tutorial page no longer resolves until i switched back and forth to main to recreate the folder

@qwint
Copy link
Collaborator

qwint commented Apr 7, 2025

http://localhost/tutorial/ still does not resolve correctly after deleting and reverting webhostlib so i'm not sure that really was an outdated test (even if it wasn't testing correctly anymore)

…_remaining_markdown

# Conflicts:
#	WebHostLib/static/assets/gameInfo.js
#	WebHostLib/static/assets/tutorial.js
"A guide for setting up A Hat in Time to be played in Archipelago.",
"English",
"ahit_en.md",
"setup_en.md",
Copy link
Collaborator

Choose a reason for hiding this comment

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

did the old js... just ignore this? 👏

Copy link
Member Author

Choose a reason for hiding this comment

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

It did

Copy link
Collaborator

@alwaysintreble alwaysintreble left a comment

Choose a reason for hiding this comment

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

Didn't test but code itself looks fine. I'd definitely prefer we added more docstrings and return typings but not necessarily in scope here.

@github-actions github-actions bot added the affects: core Issues/PRs that touch core and may need additional validation. label Apr 17, 2025
@Berserker66
Copy link
Member Author

http://localhost/tutorial/ still does not resolve correctly after deleting and reverting webhostlib so i'm not sure that really was an outdated test (even if it wasn't testing correctly anymore)

should be fixed now

Berserker66 and others added 2 commits April 17, 2025 22:54
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
qwint added a commit to qwint/Archipelago that referenced this pull request Apr 17, 2025
@qwint qwint mentioned this pull request Apr 17, 2025
@qwint
Copy link
Collaborator

qwint commented Apr 17, 2025

with my commented bugfix and the (now linked) whitespace fixes to the hk docs I'm fine from a non-code review and from a world maintainer perspective with this change,

One big gripe i have though is this removes the possibility to click on headers to get anchored links,
but even if that's an intentional change we are willing to make, the fact that the headers still look clickable is going to cause bug reports instead of an acknowledgement that the feature was removed

@qwint
Copy link
Collaborator

qwint commented Apr 18, 2025

new problem, the anchor links to the relevant setup guides that the Supported Games create are not aligned with the ids the tutorial page gives them,
the Supported Games page sends you to http://localhost/tutorial/#Adventure
while the anchor that works is http://localhost/tutorial/#adventure

similarly with spaces http://localhost/tutorial/#Hollow%20Knight vs http://localhost/tutorial/#hollow-knight

@qwint qwint added the waiting-on: author Issue/PR is waiting for feedback or changes from its author. label Apr 30, 2025
@Berserker66 Berserker66 removed the waiting-on: author Issue/PR is waiting for feedback or changes from its author. label May 3, 2025
@Berserker66
Copy link
Member Author

Fixed the anchors, it was as simple as telling markdown to load the extension we tried to configure. I feel like trying to set options for an extension that isn't loaded should at least raise a KeyError, but it is what is -.-

@Exempt-Medic
Copy link
Contributor

Screenshot 2025-05-05 091402
Screenshot 2025-05-05 091411

Messenger guide before/after.

Screenshot 2025-05-05 092705

Messenger guide with four-space indentations after.

@black-sliver
Copy link
Member

Here is my mistune version: 829dac5 so it doesn't get lost in Discord.

As far as I can see there is only 1 issue remaining: <a> inside <h?> changes the style applied from CSS.

A noteworthy change to both the current PR and the current JS code is that the way the fragments/IDs are generated in the mistune hook would be compatible to GitHub, so if you look at a "relative link" (e.g. TOC) on GitHub it should behave the same once deployed.

Why mistune? It seems to ship with sane features that mostly match GitHub, can be extended and is being maintained. The plugins I selected are the default, but I had to explicitly list them because we need raw HTML in some documents, which is disabled by default.

Feel free to merge or copy-paste the changes or ask for a PR against this branch.

Copy link
Collaborator

@qwint qwint left a comment

Choose a reason for hiding this comment

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

did not look at black sliver's mistune option but updates have resolved all my previous issues with the PR

I still think not crashing the entire page if there is an apworld installed with a default webworld would be helpful but I don't mind getting outvoted on that because those worlds do fail unit tests

@qwint qwint added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels May 11, 2025
@Berserker66 Berserker66 closed this Aug 2, 2025
@Berserker66 Berserker66 deleted the webhost_server_render_remaining_markdown branch August 2, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. affects: webhost Issues/PRs that touch webhost and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants