Adaverse commented on code in PR #30950:
URL: https://github.com/apache/airflow/pull/30950#discussion_r1205951229


##########
airflow/www/static/js/App.tsx:
##########
@@ -55,6 +56,8 @@ interface AppProps extends PropsWithChildren {
   cache: EmotionCache;
 }
 
+const isInputInFocus: IsInputInFocus = "isInputInFocus";

Review Comment:
   Here the idea behind having a type for a string was to enforce this to have 
only specific values (since it is the key of the local storage object). In the 
above case, it was below.
   ```
   // In type/index.ts
   type IsInputInFocus = "isInputInFocus";
   ```
   We can replace it with a global constant that will be imported wherever 
used. Where can I define a constant to import it anywhere required? I do not 
seem to find where we define all constants used in UI. 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to