Skip to content

[Analyse]: Begin work on script for analysing token usages #1048

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fallaciousreasoning
Copy link
Collaborator

@fallaciousreasoning fallaciousreasoning commented Apr 4, 2025

Copy link
Contributor

github-actions bot commented Apr 6, 2025

👋 Thanks for Submitting! This PR is available for preview at the link below.

✅ PR tip preview: https://1048.pr.nala.bravesoftware.com/
✅ Commit preview: https://1048.pr.nala.bravesoftware.com/commit-10300fa16c47c5ac1619f00bca1177966e432b72/

- ./tokens/css/variables-android.old.css: 7390 bytes
+ ./tokens/css/variables-android.css: 7390 bytes
---
- ./tokens/css/variables-browser.old.css: 6644 bytes
+ ./tokens/css/variables-browser.css: 6644 bytes
---
- ./tokens/css/variables-ios.old.css: 7033 bytes
+ ./tokens/css/variables-ios.css: 7033 bytes
---
- ./tokens/css/variables-marketing.old.css: 13501 bytes
+ ./tokens/css/variables-marketing.css: 13501 bytes
---
- ./tokens/css/variables-news.old.css: 526 bytes
+ ./tokens/css/variables-news.css: 526 bytes
---
- ./tokens/css/variables-newtab.old.css: 1933 bytes
+ ./tokens/css/variables-newtab.css: 1933 bytes
---
- ./tokens/css/variables-search.old.css: 2409 bytes
+ ./tokens/css/variables-search.css: 2409 bytes
---
- ./tokens/css/variables-web3.old.css: 893 bytes
+ ./tokens/css/variables-web3.css: 893 bytes
---
- ./tokens/css/variables.old.css: 119686 bytes
+ ./tokens/css/variables.css: 119686 bytes
Variables Diff: variables-android.diff
--- ./tokens/css/variables-android.old.css	2025-04-06 21:53:50.179608388 +0000
+++ ./tokens/css/variables-android.css	2025-04-06 21:53:18.222127416 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-browser.diff
--- ./tokens/css/variables-browser.old.css	2025-04-06 21:53:50.366605275 +0000
+++ ./tokens/css/variables-browser.css	2025-04-06 21:53:18.209127638 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-ios.diff
--- ./tokens/css/variables-ios.old.css	2025-04-06 21:53:50.558602081 +0000
+++ ./tokens/css/variables-ios.css	2025-04-06 21:53:18.236127177 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-marketing.diff
--- ./tokens/css/variables-marketing.old.css	2025-04-06 21:53:50.741599041 +0000
+++ ./tokens/css/variables-marketing.css	2025-04-06 21:53:18.252126903 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-news.diff
--- ./tokens/css/variables-news.old.css	2025-04-06 21:53:50.977595137 +0000
+++ ./tokens/css/variables-news.css	2025-04-06 21:53:18.274126528 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-newtab.diff
--- ./tokens/css/variables-newtab.old.css	2025-04-06 21:53:51.127592656 +0000
+++ ./tokens/css/variables-newtab.css	2025-04-06 21:53:18.281126408 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-search.diff
--- ./tokens/css/variables-search.old.css	2025-04-06 21:53:51.310589629 +0000
+++ ./tokens/css/variables-search.css	2025-04-06 21:53:18.270126596 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-web3.diff
--- ./tokens/css/variables-web3.old.css	2025-04-06 21:53:51.423587758 +0000
+++ ./tokens/css/variables-web3.css	2025-04-06 21:53:18.285126340 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 @media (prefers-color-scheme: light) {
Variables Diff: variables.diff
--- ./tokens/css/variables.old.css	2025-04-06 21:53:51.633584286 +0000
+++ ./tokens/css/variables.css	2025-04-06 21:53:18.067130062 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Wed Apr 02 2025 20:25:07 GMT+0000 (Coordinated Universal Time)
+ * Generated on Sun Apr 06 2025 21:53:18 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {


const getLineDateLookup = (filepath: string): number[] | undefined => {
try {
const content = execSync(`git blame --line-porcelain -- ${filepath}`, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Detected calls to child_process from a function argument filepath. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.

Source: https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process


Cc @thypon @kdenhartog

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you include the changes from @kdenhartog ?

Copy link
Member

@kdenhartog kdenhartog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me now with the updates

Copy link
Contributor

github-actions bot commented Apr 8, 2025

👋 Thanks for Submitting! This PR is available for preview at the link below.

✅ PR tip preview: https://1048.pr.nala.bravesoftware.com/
✅ Commit preview: https://1048.pr.nala.bravesoftware.com/commit-9c44212fec57e7fffaf6355477c3093f84da2485/

- ./tokens/css/variables-android.old.css: 7390 bytes
+ ./tokens/css/variables-android.css: 7390 bytes
---
- ./tokens/css/variables-browser.old.css: 6644 bytes
+ ./tokens/css/variables-browser.css: 6644 bytes
---
- ./tokens/css/variables-ios.old.css: 7033 bytes
+ ./tokens/css/variables-ios.css: 7033 bytes
---
- ./tokens/css/variables-marketing.old.css: 13501 bytes
+ ./tokens/css/variables-marketing.css: 13501 bytes
---
- ./tokens/css/variables-news.old.css: 526 bytes
+ ./tokens/css/variables-news.css: 526 bytes
---
- ./tokens/css/variables-newtab.old.css: 1933 bytes
+ ./tokens/css/variables-newtab.css: 1933 bytes
---
- ./tokens/css/variables-search.old.css: 2409 bytes
+ ./tokens/css/variables-search.css: 2409 bytes
---
- ./tokens/css/variables-web3.old.css: 893 bytes
+ ./tokens/css/variables-web3.css: 893 bytes
---
- ./tokens/css/variables.old.css: 120612 bytes
+ ./tokens/css/variables.css: 120612 bytes
Variables Diff: variables-android.diff
--- ./tokens/css/variables-android.old.css	2025-04-08 23:44:40.587563576 +0000
+++ ./tokens/css/variables-android.css	2025-04-08 23:44:07.915653373 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-browser.diff
--- ./tokens/css/variables-browser.old.css	2025-04-08 23:44:40.868562783 +0000
+++ ./tokens/css/variables-browser.css	2025-04-08 23:44:07.903653407 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-ios.diff
--- ./tokens/css/variables-ios.old.css	2025-04-08 23:44:41.167561972 +0000
+++ ./tokens/css/variables-ios.css	2025-04-08 23:44:07.930653331 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-marketing.diff
--- ./tokens/css/variables-marketing.old.css	2025-04-08 23:44:41.456561193 +0000
+++ ./tokens/css/variables-marketing.css	2025-04-08 23:44:07.950653275 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-news.diff
--- ./tokens/css/variables-news.old.css	2025-04-08 23:44:41.597560811 +0000
+++ ./tokens/css/variables-news.css	2025-04-08 23:44:07.972653213 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-newtab.diff
--- ./tokens/css/variables-newtab.old.css	2025-04-08 23:44:41.875560058 +0000
+++ ./tokens/css/variables-newtab.css	2025-04-08 23:44:07.979653193 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-search.diff
--- ./tokens/css/variables-search.old.css	2025-04-08 23:44:42.156559296 +0000
+++ ./tokens/css/variables-search.css	2025-04-08 23:44:07.967653227 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {
Variables Diff: variables-web3.diff
--- ./tokens/css/variables-web3.old.css	2025-04-08 23:44:42.425558567 +0000
+++ ./tokens/css/variables-web3.css	2025-04-08 23:44:07.983653182 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 @media (prefers-color-scheme: light) {
Variables Diff: variables.diff
--- ./tokens/css/variables.old.css	2025-04-08 23:44:42.869557365 +0000
+++ ./tokens/css/variables.css	2025-04-08 23:44:07.766653794 +0000
@@ -1,6 +1,6 @@
 /**
  * Do not edit directly
- * Generated on Tue Apr 08 2025 19:20:32 GMT+0000 (Coordinated Universal Time)
+ * Generated on Tue Apr 08 2025 23:44:07 GMT+0000 (Coordinated Universal Time)
  */
 
 :root {

@aguscruiz
Copy link
Collaborator

Couple thoughts:

  • We probably don't want to categorize empty values as "non Nala".
  • Neither "inherit", maybe we can skip those instances.

Both of these I found on the Rewards tab on the spreadsheet.

image


const getLineDateLookup = (filepath: string): number[] | undefined => {
try {
const content = execSync(`git blame --line-porcelain -- ${filepath}`, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you include the changes from @kdenhartog ?

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.

4 participants