mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.11k stars 1.27k forks source link

[license] Improve license key encoding algorithm #4894

Open oliviertassinari opened 2 years ago

oliviertassinari commented 2 years ago

Summary 💡

We could do better with the base64 encoding algorithm.

First, we can use the native ones, why do we even have a base64.ts file? It doesn't make sense to me when there is:

available.

Second, if you open https://app-smtp.sendinblue.com/log#dc728631-08c2-4b7e-81d0-cee62d251e89 and search for "[MUI Store] Note added to your order from", you will see a load of license key with a leading = at the end. This is so painful. A double click doesn't select the whole key (macOS and Windows), but it's so long that it often overflow, so you don't see it:

Screenshot 2022-05-16 at 00 33 47

the obvious fix is to replace = with _, quick win guaranteed.

Examples 🌈

No response

Motivation 🔦

No response

Order ID 💳 (optional)

No response

oliviertassinari commented 2 years ago

the obvious fix is to replace = with _, quick win guaranteed.

Bingo: