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
I'd like to start a discussion about a specific use case that may be interesting to explore (and may already be possible with facet).
Let's indulge in a hypothetical scenario:
We are working on a tool which uses json as its configuration format (don't question it, it's a hypothetical scenario).
Let's say the config has the keys allow_files and block_files. The user can use these to define arrays of file paths the tool is allowed to or not allowed to use.
What we now want is for the user to get feedback when misconfiguring the tool. Here's an example config with a misconfiguration:
This misconfiguration could result in this feedback being printed:
Error: file can't be allowed and blocked at the same time!
At lines 4 and 7 of the configuration file:
{
"allow_files":[
"/file1",
"/file2" ◄──────┐
], ├─── File can't be in both arrays!
"block_files":[ │
"/file2" ◄──────┘
]
}
This is really good because it tells the user exactly where the misconfiguration happened and why! The user doesn't even need to have technical knowledge to understand it.
Unfortunately, user experience like this is very rare. Mainly because parsing and validation are usually treated as two different independent steps. For this to work, more context needs to passed from the parsing to the validation step. The validation step needs to know the entire input string, what token and construct appears in which line, what those tokens and constructs represent in the context of the application, and more.
I believe that in order for user experience like this to become more common, the developer experience to enable it must become easier and that's why I think it could be potentially interesting for facet.
Let me know what you think, any thoughts, ideas and potential implementations are welcome.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to start a discussion about a specific use case that may be interesting to explore (and may already be possible with facet).
Let's indulge in a hypothetical scenario:
We are working on a tool which uses json as its configuration format (don't question it, it's a hypothetical scenario).
Let's say the config has the keys
allow_files
andblock_files
. The user can use these to define arrays of file paths the tool is allowed to or not allowed to use.What we now want is for the user to get feedback when misconfiguring the tool. Here's an example config with a misconfiguration:
This misconfiguration could result in this feedback being printed:
This is really good because it tells the user exactly where the misconfiguration happened and why! The user doesn't even need to have technical knowledge to understand it.
Unfortunately, user experience like this is very rare. Mainly because parsing and validation are usually treated as two different independent steps. For this to work, more context needs to passed from the parsing to the validation step. The validation step needs to know the entire input string, what token and construct appears in which line, what those tokens and constructs represent in the context of the application, and more.
I believe that in order for user experience like this to become more common, the developer experience to enable it must become easier and that's why I think it could be potentially interesting for facet.
Let me know what you think, any thoughts, ideas and potential implementations are welcome.
Beta Was this translation helpful? Give feedback.
All reactions