Page MenuHomePhabricator

[e.cash] Remove env vars from repo
ClosedPublic

Authored by johnkuney on Aug 7 2023, 20:40.

Details

Reviewers
bytesofman
Fabien
Group Reviewers
Restricted Project
Commits
rABC6515aa92fb65: [e.cash] Remove env vars from repo
Summary

removing the GA id and weglot key from this public repo to instead be inserted in the CI build

Test Plan

preview the site and everything should function as before but GA and weglot will have undefined for their id values
You should see some text in the top right explaining this if they are absent

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Aug 8 2023, 22:33
Fabien requested changes to this revision.Aug 9 2023, 07:48
Fabien added a subscriber: Fabien.

Let's move these ids out of the repo instead:

  1. let the code work with no env var set
  2. remove the env variables (same for google analytics) from the repo
  3. generate a new api key for google and for the "original" translation project
  4. update the CI to call the deployment/preview with the appropriated key as env vars
This revision now requires changes to proceed.Aug 9 2023, 07:48

Okay removed them here. Page will still work like this, just weglot and GA wont as the ids are undefined.

I'm not sure how you update the CI to call the deployment/preview with the appropriate key as env vars though. Were you going to do that part?

Okay removed them here. Page will still work like this, just weglot and GA wont as the ids are undefined.

I'm not sure how you update the CI to call the deployment/preview with the appropriate key as env vars though. Were you going to do that part?

@Fabien I've updated these in the "Build eCash" step in teamcity -- let me know if implementation is correct

Okay removed them here. Page will still work like this, just weglot and GA wont as the ids are undefined.

Can we have a discrete banner that explains that the feature is disabled because the appropriated env var is unset ?

I'm not sure how you update the CI to call the deployment/preview with the appropriate key as env vars though. Were you going to do that part?

Either @bytesofman or myself can do that

add banner to nav if env vars are missing

Fabien requested changes to this revision.Aug 11 2023, 22:37

Yes, something like that

web/e.cash/components/navbar/index.js
72 ↗(On Diff #41798)
76 ↗(On Diff #41798)
web/e.cash/components/navbar/styles.js
347 ↗(On Diff #41798)

You can make it opaque, it's not supposed to show under normal circumstances so better make it very visible

This revision now requires changes to proceed.Aug 11 2023, 22:37

Also please edit the title and summary of the diff

johnkuney retitled this revision from [e.cash] Switch weglot projects to [e.cash] Remove env vars from repo.Aug 11 2023, 23:09
johnkuney edited the summary of this revision. (Show Details)
johnkuney edited the test plan for this revision. (Show Details)
johnkuney edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 14 2023, 11:34
This revision was automatically updated to reflect the committed changes.