harvard-lil / perma

Indelible links
408 stars 72 forks source link

Install Vue #3482

Closed rebeccacremona closed 3 months ago

rebeccacremona commented 3 months ago

See ENG-737 and ENG-731.

As a first stage in modernizing Perma's front end, we are beginning a migration to VueJS.

This PR installs Vue, configures webpack to build a new Vue-inclusive bundle for Perma's dashboard page, and arranges for that bundle to be loaded (admins only).

Since that's another 700K... I decided to go ahead and tack ENG-731 onto this PR as well, so that admin users won't get this addition by default: they'll have to opt in via the query string.

I created a new waffle flag, vue-dashboard, via a tiny data migration, and then added that check to the view. Admins can toggle it by adding ?dwf_vue-dashboard=0 (false) or ?dwf_vue-dashboard=1 (true) to the URL as desired.

Examples with folders:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.22%. Comparing base (34b9479) to head (44f9994). Report is 2 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3482 +/- ## ======================================== Coverage 71.22% 71.22% ======================================== Files 48 48 Lines 6512 6512 ======================================== Hits 4638 4638 Misses 1874 1874 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rebeccacremona commented 3 months ago

Ah, I meant to say: I was copying the frontend/pages directory structure of h2o, imagining there would be frontend/components etc. going forward as necessary.

jcushman commented 3 months ago

lgtm!