Rename `flash.js` to `alert.js`
What does this MR do and why?
A few frontend engineers have supported the idea of renaming flash.js
to alert.js
. The word flash
is no longer relevant and it should probably be used only in the Rails context. Hence, we reserve the name flash
for alert message created by the Rails framework, and alert
if they are created by JavaScript.
I suggest this MR be reviewed in the following order:
- In the first commit, we rename
flash.js
toalert.js
. - In the second commit, we modify a few imports that makes the configuration changes in step #3 easier.
- In the third commit, we set up two aliases (in the webpack and jest configurations) so the file can found by the new and old names.
- After this MR is approved, I will create follow-up MRs to change the import paths to the new name (
alert.js
) in batches of 20 files. On the last MR, I will removed the aliases in the configuration files.
I have talked with a few frontend engineers about the best location for the file. After evaluating a few suggestion, ~/lib
, ~/vue_shared
, we feel the root directory (~/
), although a bit too crowded, is the best place in terms of simplicity and uniformity.
Screenshots or screen recordings
N/A
How to set up and validate locally
N/A
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.