Skip to content
This repository has been archived by the owner. It is now read-only.

Implement static page rendering with progressive enhancement #1306

Closed
lmorchard opened this issue Aug 29, 2016 · 2 comments
Closed

Implement static page rendering with progressive enhancement #1306

lmorchard opened this issue Aug 29, 2016 · 2 comments
Assignees
Milestone

Comments

@lmorchard
Copy link
Member

@lmorchard lmorchard commented Aug 29, 2016

Probably way too big an issue to file as such, but here goes:

We should build a static HTML rendering of all pages - experiment pages, legal pages, everything - in a way that works for most browsers.

Then, when the JS kicks in and we detect Firefox, we can flip on/off relevant bits. Same goes for whether we do or don't detect the Test Pilot add-on as installed.

Ideally, it would be great if we could statically render React templates and dynamically render the JS-dependent bits also within React. Not-as-ideally, we could render the base cases with something like Jekyll and then sprinkle in React magic after load.

@lmorchard
Copy link
Member Author

@lmorchard lmorchard commented Aug 29, 2016

Also, possibly blocked by #1307 (React conversion) unless we want to jump straight at Jekyll / Liquid Template rendering.

Prior art: https://github.com/chuckharmston/testpilot-flatfiles

lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 3, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 3, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 3, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 3, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 4, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 7, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
lmorchard added a commit to lmorchard/testpilot that referenced this issue Sep 7, 2016
- New frontend/ directory for build process moved out of Django

- Reorganize gulpfile.js into separate modules for tasks

- Tweak addon build process to no longer move builds into Django static path

- Generate static landing pages with social share metadata

- Create server-side /api/experiments/usage_counts/json resource

- Generate static /api/experiments/usage_counts.json

- Static build & deploy machinery for Circle CI

Issue mozilla#1306, mozilla#1312, mozilla#1305
@wresuolc wresuolc modified the milestones: TXP-0: Code Quality, Bug Fixes, Technical Debt, TXP-32 Frontend Migration Sep 19, 2016
@wresuolc wresuolc modified the milestone: Sprint 19 Feb 13, 2017
@wresuolc wresuolc modified the milestone: Sprint 19 Feb 24, 2017
@fzzzy
Copy link
Collaborator

@fzzzy fzzzy commented Apr 7, 2017

I'm actually most of the way done with this at https://github.com/fzzzy/testpilot/tree/remove-react-router , so I'll close this as a dup of #2260

@fzzzy fzzzy closed this Apr 7, 2017
@fzzzy fzzzy removed the status: ready label Apr 7, 2017
@wresuolc wresuolc modified the milestone: Sprint 23 May 6, 2017
lmorchard added a commit to lmorchard/testpilot that referenced this issue May 11, 2017
- Rename gulpfile.js -> gulpfile.babel.js to enable ES6 via Babel

- Remove routes and usage of react-router, switch to server-side
  rendering of pages defined under `frontend/pages` (mozilla#2260, mozilla#1306)

- Inject data-page-name & data-page-param attributes into <body> to
  drive app bootstrap as a replacement for window.location routing.

- Move Markdown pages from `compiled-templates` to `frontend/pages`
  alongside React-base pages

- Merge generate-static-html.js into frontend/tasks/pages.js now that
  Gulp runs under Babel + ES6

- Delete Gulp task scripts-generate-static-html since we don't need to
  pre-process ES6 to use it in the build process.

- Remove logic that adapts home page to state of add-on installation in
  order to minimize content flashes on load, split into separate pages /
  and /experiments

- Restore /experiments page for users with add-on installed (mozilla#2383)

- Add-on install button switches to link to /experiments page if add-on
  already installed (mozilla#2383)

- Switch to normal <a> links, since we don't need <Link> for routing

- Tweaks to adapt Redux state to server-side rendering without browser
  context or add-on installation status

- Remove `history`, `react-router`, & `react-router-redux` dependencies

- Add `react-markdown` dependency to better integrate Markdown content
  in pages gulp task.

- Merge template for markdown-based pages into frontend/tasks/pages.js

- Misc tweaks to clean up awkward module imports & exports

Fixes mozilla#2260.
Fixes mozilla#2383.
Fixes mozilla#1306.
@lmorchard lmorchard self-assigned this May 11, 2017
lmorchard added a commit to lmorchard/testpilot that referenced this issue May 11, 2017
- Rename gulpfile.js -> gulpfile.babel.js to enable ES6 via Babel

- Remove routes and usage of react-router, switch to server-side
  rendering of pages defined under `frontend/pages` (mozilla#2260, mozilla#1306)

- Inject data-page-name & data-page-param attributes into `<body>` to
  drive app bootstrap as a replacement for window.location routing.

- Move Markdown pages from `compiled-templates` to `frontend/pages`
  alongside React-base pages

- Merge generate-static-html.js into frontend/tasks/pages.js now that
  Gulp runs under Babel + ES6

- Delete Gulp task scripts-generate-static-html since we don't need to
  pre-process ES6 to use it in the build process.

- Remove logic that adapts home page to state of add-on installation in
  order to minimize content flashes on load, split into separate pages /
  and /experiments

- Restore /experiments page for users with add-on installed (mozilla#2383)

- Add-on install button switches to link to /experiments page if add-on
  already installed (mozilla#2383)

- Switch to normal <a> links, since we don't need <Link> for routing

- Tweaks to adapt Redux state to server-side rendering without browser
  context or add-on installation status

- Remove `history`, `react-router`, & `react-router-redux` dependencies

- Add `react-markdown` dependency to better integrate Markdown content
  in pages gulp task.

- Merge template for markdown-based pages into frontend/tasks/pages.js

- Misc tweaks to clean up awkward module imports & exports

Fixes mozilla#2260.
Fixes mozilla#2383.
Fixes mozilla#1306.
lmorchard added a commit to lmorchard/testpilot that referenced this issue May 11, 2017
- Rename gulpfile.js -> gulpfile.babel.js to enable ES6 via Babel

- Remove routes and usage of react-router, switch to server-side
  rendering of pages defined under `frontend/pages` (mozilla#2260, mozilla#1306)

- Inject data-page-name & data-page-param attributes into `<body>` to
  drive app bootstrap as a replacement for window.location routing.

- Move Markdown pages from `compiled-templates` to `frontend/pages`
  alongside React-base pages

- Merge `generate-static-html.js` into `frontend/tasks/pages.js` now that
  Gulp runs under Babel + ES6

- Merge template for markdown-based pages into `frontend/tasks/pages.js`

- Delete Gulp task `scripts-generate-static-html` since we don't need to
  pre-process ES6 to use it in the build process.

- Remove logic that adapts home page to state of add-on installation in
  order to minimize content flashes on load, split into separate pages /
  and /experiments

- Restore /experiments page for users with add-on installed (mozilla#2383)

- Add-on install button switches to link to /experiments page if add-on
  already installed (mozilla#2383)

- Switch to normal <a> links, since we don't need <Link> for routing

- Tweaks to adapt Redux state to server-side rendering without browser
  context or add-on installation status

- Remove `history`, `react-router`, & `react-router-redux` dependencies

- Add `react-markdown` dependency to better integrate Markdown content
  in pages gulp task.

- Misc tweaks to clean up awkward module imports & exports

Fixes mozilla#2260.
Fixes mozilla#2383.
Fixes mozilla#1306.
@wresuolc wresuolc modified the milestones: Sprint 23 , Sprint 25 May 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.