You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for dynamic variable autocomplete in any textarea (e.g., @variablename). These variables would be parsed and replaced with values fetched from an external source (e.g., a database) based on custom logic.
Use Case:
When a user types @variablename, the system suggests values or automatically replaces the variable upon invoking a method like input.getValue(). This feature should be lightweight with minimal impact on bundle size.
@knadh if this a good feature to be added , I can work on this
The text was updated successfully, but these errors were encountered:
Yes this might be out of scope , the main idea is "context aware". lets say you are writing this content
user @SomeRandomUserId , your account balance is SUM(@balance_prev_month,@current_spend)
^^ here @SomeRandomUserId need not be replaces with anything ,it could be maybe insta handle not variable
Now if we use the onQuery thing , then for each "@" it will show variable right? onQuery does not know context where it is written. Even if we do some prefix matching then also it won't be that context aware ( knowing where to show variable and where to not .. this is just one example ) . Also all "@[string]" would get styles same if we apply some static logic
In my code I achieved some level of context awareness ( could be improved ) by writing the below grammar using lexer
expression { Condition | tep }
Operators {Assign| ArtithMeticOperators | LogicalOperators}
tep { Variable | Number | Functions | String }
Unlimited { tep ',' Unlimited | "" | tep }
Condition { tep Operators tep}
Functions {ARRAYFORMULA "(" expression ")"|FILTER "(" Unlimited ")"|ARRA
... contiued
Ayway thanks for replying , I was just looking to contribute on floatbase or some project of zerodha tech
I worked on this library few years back:
https://formula-parser-editor.vercel.app/
GitHub URL
Screen.Recording.2024-09-22.at.3.28.34.PM.mov
Description:
Add support for dynamic variable autocomplete in any textarea (e.g., @variablename). These variables would be parsed and replaced with values fetched from an external source (e.g., a database) based on custom logic.
Use Case:
When a user types @variablename, the system suggests values or automatically replaces the variable upon invoking a method like input.getValue(). This feature should be lightweight with minimal impact on bundle size.
@knadh if this a good feature to be added , I can work on this
The text was updated successfully, but these errors were encountered: