bitbox-wallet-app icon indicating copy to clipboard operation
bitbox-wallet-app copied to clipboard

Frontend vendor modules

Open thisconnect opened this issue 2 years ago • 4 comments

This PR forks flag-icons, added smaller flags (compressed with less precision), removed unused flags, applied some unreleased updates. See flag-icons/README.md for list of changes.

It is the first npm module that is vendored in frontends/web/node_vendor/.

Other npm modules that have no dependencies could be vendored in a similar way in the future, this way we could better review changes in the dependencies.

There is many commits, but once approved I plan to squash all commits except https://github.com/digitalbitbox/bitbox-wallet-app/pull/2016/commits/ca193b824063f95424845ee1cc634f54b3405e2e

This PR

thisconnect avatar Mar 16 '23 09:03 thisconnect

Did a test build and merged this into staging-darkmode, here is how it looks with darkmode:

Screen Shot 2023-03-16 at 10 12 07

Screen Shot 2023-03-16 at 10 12 14

Screen Shot 2023-03-16 at 10 11 56

thisconnect avatar Mar 16 '23 09:03 thisconnect

master (d218bc5134e9fdd1495ed36d6fb48679c73bfbaf)

File sizes after gzip: 38.96 kB build/static/css/main.8628b67e.css

du frontends/web/build/static/media 18216 frontends/web/build/static/media

this branch (86360fa50e29ea7f7db66ca68c8c3a2033f29974)

File sizes after gzip: 33.27 kB build/static/css/main.69a6916f.css

du frontends/web/build/static/media 9312 frontends/web/build/static/media

thisconnect avatar Mar 16 '23 09:03 thisconnect

@benma this is new, vendoring the first npm module, PTAL.

planing to squash all commits.

with this change, the flag-icons are now taken from our local vendored directory https://github.com/digitalbitbox/bitbox-wallet-app/blob/873d9672e34aa3ea0cb1bee699888b6d9887241c/frontends/web/src/routes/buy/exchange.tsx#L16

thisconnect avatar Mar 21 '23 16:03 thisconnect

This PR forks flag-icons, added smaller flags (compressed with less precision), removed unused flags, applied some unreleased updates. See flag-icons/README.md for list of changes.

If I understand correctly you vendored a dep and modified the vendored code? The way to go is normally to fork the dep to its own repo (e.g. to the digitalbitbox org), do modifications there, and vendor that instead. This way, if upstream has changes to pull in, it much easier to see what modifications we did and how to merge upstream.

benma avatar Mar 22 '23 15:03 benma

flagicons was updated and fixed. I think we still could vendor the prod deps, but will open a different PR for that.

thisconnect avatar Aug 21 '24 09:08 thisconnect