-
Notifications
You must be signed in to change notification settings - Fork 26
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
Settle frontend architecture #190
Comments
marein
added a commit
that referenced
this issue
Oct 19, 2023
This adds the possibility to cache assets for a long period of time #190. Assets are versioned using Symfony's AssetMapper. The import map is built so that each domain can maintain its own import map to avoid merge conflicts. For browsers that don't support import maps yet, a polyfill is loaded conditionally. Icons aren't versioned as files like site.webmanifest aren't compiled. Additional changes: * Remove service-js-polyfill, and thus support for old browsers * Fix broken links in documentation
marein
added a commit
that referenced
this issue
Oct 22, 2023
Additionally prefix custom events dispatched from custom elements with the name of the custom element #190.
marein
added a commit
that referenced
this issue
Oct 24, 2023
Custom elements must be registered in the import map with their tag name. On page load, all undefined elements are loaded lazily. Since they can appear out of order, a custom app:load event is dispatched so that components know when everything is loaded #190. Additionally update selenium.
marein
added a commit
that referenced
this issue
Oct 28, 2023
All links on the page are intercepted and checked to see if they're a valid internal link. If so, the page is loaded dynamically via ajax, then all undefined custom elements are loaded to avoid flickering, and then the page is placed in the DOM. The same works for popstate events and programmatic triggers, such as joining a game #190.
marein
added a commit
that referenced
this issue
Nov 1, 2023
This unification is intended to avoid naming conflicts between domains #190. Also reformat js code and use fetch instead of XMLHttpRequest everywhere.
Reopened, as some postponed items are now being worked on. |
marein
added a commit
that referenced
this issue
May 15, 2024
Add tabler.io, which contains a variety of components that are useful for the project (showing player statistics in charts, the chat widget, forms, grids, tables) #190. Additional changes: * Enable dark mode based on the preferred color scheme. * All self-built components use the prefix gp-. * Fix some ux related issues in the lobby. * Use uhtml to render nodes instead of using the DOM api. * Use default timeouts in acceptance tests as they sometimes failed.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The frontend has been an after thought. Let's change that.
Although the current implementation, meaning "traditional" server-side rendering with some custom elements, is only cobbled together to provide "some" user interface, it has proven its worth as no maintenance was required thanks to backward-compatible browsers and the stability of web standards. The main goal is to apply progressive enhancement and hypermedia controls with the least amount of dependencies and asset size wherever possible.
However, there is some room for improvement here, which should be considered:
js
,css
,images
) should be versioned so that they can be cached for a long period of time. Latest browser features likescript[type="importmap"]
could be of good use.Version assets #191
Load custom elements lazily #193
Add dynamic page loads #195
Unify prefix for custom elements #196
Use a design system #232 (ships
uhtml
)Use a design system #232
Use early hints for faster page loads.Not yet.Assets could be minified by using an AssetMapper compilerNot yet.service-js-polyfill
as all modern browsers should be able to support the shipped polyfills by now (exceptscript[type="importmap"]
).Version assets #191
Maybe, just maybe, keepservice-js-polyfill
in order to host 3rd party modules (as an internal CDN) without the need to install npm on the main application image. But public CDNs can be considered for this playground project too.Going with public CDNs for simplicity and Symfony's AssetMapper can now download dependencies.
The text was updated successfully, but these errors were encountered: