Archipelago/WebHostLib
Remy Jette 77e3f9fbef
WebHost: Fix NamedRange values clamping to the range (#3613)
If a NamedRange has a `special_range_names` entry outside the
`range_start` and `range_end`, the HTML5 range input will clamp the
submitted value to the closest value in the range.

These means that, for example, Pokemon RB's "HM Compatibility" option's
"Vanilla (-1)" option would instead get posted as "0" rather than "-1".

This change updates NamedRange to behave like TextChoice, where the
select element has a `name` attribute matching the option, and there is
an additional element to be able to provide an option other than the
select element's choices.

This uses a different suffix of `-range` rather than `-custom` that
TextChoice uses. The reason is we need some way to decide whether to use
the custom value or the select value, and that method needs to work
without JavaScript. For TextChoice this is easy, if the custom field is
empty use the select element. For NamedRange this is more difficult as
the browser will always submit *something*. My choice was to only use
the value from the range if the select box is set to "custom". Since
this only happens with JS as "custom' is hidden, I made the range hidden
under no-JS. If it's preferred, I could make the select box hidden
instead. Let me know.

This PR also makes the `js-required` class set `display: none` with
`!important` as otherwise the class wouldn't work on any rule that
had `display: flex` with more specificity than a single class.
2024-07-29 20:13:44 -04:00
..
api WebHost: allow getting checksum-specific datapackage via /api/datapackage/<checksum> (#3451) 2024-06-08 05:07:14 -04:00
static WebHost: fix accidental robots.txt capture (#3502) 2024-06-21 14:54:19 +02:00
templates WebHost: Fix NamedRange values clamping to the range (#3613) 2024-07-29 20:13:44 -04:00
README.md Explaining the "Style Lockdown" (#940) 2022-08-22 19:01:21 -04:00
__init__.py WebHost: Massive overhaul of options pages (#2614) 2024-05-18 00:11:57 -04:00
autolauncher.py WebHost: properly stop worker threads (#3340) 2024-05-19 20:40:36 +02:00
check.py WebHost: check: display exception chain one layer deep (#3153) 2024-04-15 21:26:59 -04:00
customserver.py customserver: fix minor memory leak (#3636) 2024-07-14 13:56:56 +02:00
downloads.py Final Fantasy Mystic Quest: Implement new game (#1909) 2023-11-26 17:17:59 +01:00
generate.py WebHost: use settings defaults for /api/generate and options -> Single Player Generate (#3411) 2024-05-29 16:53:18 +02:00
landing.py WebHost: optimize imports 2022-10-17 01:24:02 +02:00
locker.py Core, WebHost: lazy-load worlds in unpickler, WebHost and WebHostLib (#2156) 2023-09-20 16:05:56 +02:00
lttpsprites.py WebHost: Fixed warning ".gitignore dropped, as it has no valid sprite data." (#1174) 2022-11-02 19:06:00 +01:00
misc.py WebHost: Log: handle FileNotFoundError (#3603) 2024-07-02 01:03:55 +02:00
models.py WebHost: index columns used by landing page. 2023-05-21 05:01:29 +02:00
options.py WebHost: Fix NamedRange values clamping to the range (#3613) 2024-07-29 20:13:44 -04:00
requirements.txt WebHost: update dependencies (#3476) 2024-06-06 01:51:05 +02:00
robots.py WebHost: fix accidental robots.txt capture (#3502) 2024-06-21 14:54:19 +02:00
stats.py Docs: datapackage typing (#1229) 2022-11-27 19:25:53 -06:00
tracker.py Fix obvious typo (#3622) 2024-07-28 00:44:48 -04:00
upload.py WebHost: Prevent committing data packages with invalid checksums to database and prevent 500 error from invalid `zip` files. (#3206) 2024-04-26 22:18:12 -04:00

README.md

WebHost

Contribution Guidelines

Thank you for your interest in contributing to the Archipelago website!
Much of the content on the website is generated automatically, but there are some things that need a personal touch. For those things, we rely on contributions from both the core team and the community. The current primary maintainer of the website is Farrak Kilhn. He may be found on Discord as Farrak Kilhn#0418, or on GitHub as LegendaryLinux.

Small Changes

Little changes like adding a button or a couple new select elements are perfectly fine. Tweaks to style specific to a PR's content are also probably not a problem. For example, if you build a new page which needs two side by side tables, and you need to write a CSS file specific to your page, that is perfectly reasonable.

Content Additions

Once you develop a new feature or add new content the website, make a pull request. It will be reviewed by the community and there will probably be some discussion around it. Depending on the size of the feature, and if new styles are required, there may be an additional step before the PR is accepted wherein Farrak works with the designer to implement styles.

Restrictions on Style Changes

A professional designer is paid to develop the styles and assets for the Archipelago website. In an effort to maintain a consistent look and feel, pull requests which exclusively change site styles are rejected. Please note this applies to code which changes the overall look and feel of the site, not to small tweaks to CSS for your custom page. The intention behind these restrictions is to maintain a curated feel for the design of the site. If any PR affects the overall feel of the site but includes additive changes, there will likely be a conversation about how to implement those changes without compromising the curated site style. It is therefore worth noting there are a couple files which, if changed in your pull request, will cause it to draw additional scrutiny.

These closely guarded files are:

  • globalStyles.css
  • islandFooter.css
  • landing.css
  • markdown.css
  • tooltip.css

Site Themes

There are several themes available for game pages. It is possible to request a new theme in the #art-and-design channel on Discord. Because themes are created by the designer, they are not free, and take some time to create. Farrak works closely with the designer to implement these themes, and pays for the assets out of pocket. Therefore, only a couple themes per year are added. If a proposed theme seems like a cool idea and the community likes it, there is a good chance it will become a reality.