Skip to content
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

New design #6

Merged
merged 62 commits into from
Mar 31, 2018
Merged

New design #6

merged 62 commits into from
Mar 31, 2018

Conversation

AmauryCarrade
Copy link
Member

@AmauryCarrade AmauryCarrade commented Mar 12, 2018

This changes completely how the ZéPS is presented and prepares it to the ZéPS V2.
It also greatly improves the front-end by using NPM and Webpack to manage the dependencies and build the project.

TODO

  • Webpack
  • Grandes lignes du nouveau design
  • Carte adaptée, possibilité de changer le chemin en évidence
  • Le chemin le plus court est affiché par défaut
  • Remplacement des listes déroulantes par des champs libres avec autocomplétion
  • Corriger les événements dans le HTML injecté (p.ex. en ajoutant une méthode pour les définir qu'on rappelle, dans routing-results.js).
  • Corriger l'affichage du bouton « Afficher la carte / l'itinéraire » sur mobile (p.ex. via des méthodes pour l'afficher ou le masquer dans routing-results.js, ainsi qu'une classe pour le masquer de force complètement même sur mobile, quand il n'y a plus d'itinéraire).
  • Mettre dynamiquement la carte à jour.
  • Ajouter les modales pour les stats et les oublis, ainsi que les URLs de redirection.
  • Rediriger /plan sur /.
  • Nettoyer les gabaris devenus inutiles.
  • Ajouter la fermeture des modales avec échap.
  • Améliorer la touche « Entrée » sur les formulaires.
  • Ajouter les attributions.
  • Améliorer l'autocomplétion :
  • Attendre les réponses sur Slack.

- Added search map on the  homepage.
- Improved the geolocation modal, displaying buttons instead of a list.
- Added useless animation on the revert button.
- Other things.
- Fixed geolocation box layout.
- Added possibility to close modal by clicking on the black overlay.
- Tested new police for the logo, to enhance the italic “é”.
- Fixes.
Implemented:
- form;
- geolocation;
- fast completion from the map (todo add ctrl+clic on station dot to add even faster).
* NEW: Added smart weighted autocompletion.
* NEW: Reorganized HTML a little bit, removing unused parts.
* NEW: Added (simple, for the moment) support for stations input as names instead of code names like before (as we no longer use a select
list).
* NEW: Removed hidden inputs with stations code name as they will not be used after all.
→ The quickest path is now displayed by default.
→ Other paths are always displayed in a openable list.
* BUG: selected options where not displayed when active on result pages.
* RFT: removed useless template file.
* NEW: the highlighted path auto-fit uses now a lower zoom if very small, so the path is less under the left panel.
* NEW: in small screens, there's a button to hide the details pane, so the map can be seen.
* NEW: The CSS was converted to a SCSS structure for better maintenance.
* NEW: Now using webpack to compile files to CSS/ES5.

Still TODO to fully use webpack for everything:
- loads the JS files using webpack;
- update the way data is passed to the JS files (using data attributes probably);
- update the JS references in the templates;
- add prod/debug configuration.
* BUG: fixed some non-migrated or now-useless styles (as newer version of CSS libraries fixed stuff I fixed before).
* NEW: started to migrate JS to webpack and ES6.
* NEW: removed side-effects from modules.
* NEW: added back autocomplete.
* BUG: fixed some small stylings.
* OPT: separated the vendor dependencies from our own JS in generated bundles.
* NEW: started to work on the new version of NetworkMap. Still a lot to do!
* NEW: switched to webpack-dev-server instead of webpack --watch.
* NEW: added dev and prod configurations through NPM scripts.
* NEW: added webpack-dev-server integration inside Silex.

TODO: documentation in README.
* NEW: the network map's data is now loaded from HTML data attributes (no more twig-generated JS).
* NEW: updated the network map to the latest version of leaflet.

Still TODO:
- update styles, as the latest leaflet versions added new styles for the tooltips and they does not fit at all our needs;
- refactor the way stations are colored so they can be colored multiple times, bringing map's highlighted path's live update.
* NEW: finished the initial migration of NetworkMap to Webpack+ES6.
* BUG: fixed some styles and behaviors, due to the Leaflet update.
* BUG: fixed main stations non injected for non-index page, and non-injected to HTML data attributes.
* BUG: fixed highlighted path non correctly imported.
* NEW: added a JSON response to the search_results route, either if the request is sent using AJAX (X-Requested-With: XMLHTTPRequest) or if an “ajax” GET parameter is present (the second one mainly for testing or other uses).
* NEW: when the form is submitted, it is sent through AJAX by catching the event and cancelling it. Without JS, the site still works (but without the map, of course).
* NEW: improved the way the reduce button is displayed, adding a force-hidden state to be able to toggle it everytime.
* NEW: the title is now a link to the homepage (read: without route displayed). Clicking it with JS also switch back to this “default-without-route” view without reload.
* OPT: the map is not re-rendered when erased if it's already in a state without highlighted path.
* NEW: added attribution on the map.
* NEW: added a basic system to provide a per-world attribution, anticipating the ZéPSV2.
* NEW: added a stylised modal to the ZéPS to host all other pages in tabs.
* NEW: added back the “missings” page, plus form adapted to Bulma and live-submission.
* NEW: added back the statistics page, with a new design.
* NEW: added a new “about” page, with attribution data, last updates, authors, links, thanks, etc.
* NEW: added links to open these pages at the bottom of the map. (Are they visible enough?)
* NEW: the autocompletion now ignores special characters.
* NEW: the autocompletion limit is now 12 results instead of 10.
As the pages here are only stubs included in the modal; they should not be consulted directly.
* BUG: fixed search form being sent (through AJAX) if empty. No harm, but displays the loader a second for nothing.
* OPT: made the map CSS more specitic to elements inside the map container.
* NEW: added a reset method to EasyAutocomplete, to allow to hide the suggestions.
* BUG: fixed a non-strict comparison.
* BUG: removed the old opening of the geolocation dialog when the from field is left empty. It was used back when the from field was a select element, and the “Geolocate me” option was the empty value of the list but that's no longer true.
* NEW: added bindings to the “enter” key on the fields. When “enter” in pressed, in the first field the map will zoom on the station if it exists (acting as a search field on the map) and focus the other field ; in the second field it will submit the form.
* NEW: added error shakes if the values are missing.
* BUG: fixed autocompletion icons badly placed.
*BUG: Fixed form sent on some browsers if enter is pressed on the empty from field.
* NEW: added versions to the about sub-page.
* NEW: the authors and thanks are no longer hardcoded but rather loaded from the composer.json file.
…ers.

* BUG: stations were not matched if one entered a capitalized special character; as example, « Î » would not match « Île » nor « île ».
* BUG: because of some weird reason, Android mobile browsers always return a 0 or 229 char code on the keydown & keyup events, resulting on unusable autocompletion. This fixes this on EasyAutocomplete.
* TODO: open a pull request to bring this fix upstream (also true for the external container feature btw).
* NEW: added a NPM script to run the app open for all ingoing IPs, allowing to remotely access the app, and re-wrote the webpack integration to lookup for the correct webpack dev server IP if running remotely. Hot reload and
WebIDE from Firefox for Android, yay!
* NEW: for the mobile device to closes their keyboard when the form is submitted, the fields are un-focused if sent using the enter key.
* NEW: added a personalized Attribution component, to 1) add spans to the markup to be able to stylize the attributions, 2) add options to personalize the separators, 3) add support for multiple attributions per layer (in an
array).
* NEW: improved attribution styling to put the “menu” on another line in mobile devices, and to ensure that 100% of the width is used in this case.
* NEW: moved the scale control a little bit so it is above the attribution.
* NEW: added partners displayed on the “about” page, with logo & description. The data is on the configuration file, default empty.
* NEW: added a “zcraft” config file containing values for Zcraft, so they can be versionned, and logos for easier deployment (only used for Zcraft).
@AmauryCarrade AmauryCarrade merged commit 3a9720f into master Mar 31, 2018
@AmauryCarrade AmauryCarrade deleted the new-design branch March 31, 2018 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant