keymanapp / shared-sites

Shared code across keyman.com sites
MIT License
0 stars 1 forks source link

chore: refactor KeymanHosts #13

Open mcdurdin opened 9 months ago

mcdurdin commented 9 months ago

KeymanHosts is currently overly complex. However there are a number of challenges around determining which URLs to be using by various parts of the sites -- for example handling overrides for development (as we may not want to be running e.g. api.keyman.com locally).

  1. Use a table-based structure rather than constructing URLs, so that we have explicit references to each tier's possible URLs.
  2. Allow for overrides on DEVELOPMENT tier from a localenv.php? file
  3. Use the same table to generate javascript constants for scripts -- and always use the constants and don't guess
  4. Ensure TIER_TEST overrides.
mcdurdin commented 9 months ago

Also, refactor environment getenv() calls into module so we have a single global KeymanSiteEnvironment class

mcdurdin commented 9 months ago

Future: let users choose which sites they want to host locally, and munge internal links accordingly

darcywong00 commented 9 months ago

Future: let users choose which sites they want to host locally, and munge internal links accordingly

See impact to https://github.com/keymanapp/website-local-proxy

darcywong00 commented 1 month ago

From A18S14 sprint plan, we'll defer refactoring till 19.0