-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show "fallback" in prompt title if, er, falling back
As discussed here: - #393 (comment) That comment suggested being a bit more verbose: CommandT [ find (fall-backed from git) ] but here I'm going with something a little less descriptive: CommandT [fallback] seeing as the extra detail in the title doesn't tell you _what_ went wrong; really, all we can do here is show a hint that _something_ went wrong, so we might as well be brief about it. Two things to note about implementation: - One is that I am playing around here trying to figure out how much metatable magic I want in here without making it all too "clever". So here I have a `__newindex` implementation that allows us to write `prompt.name = 'fallback'` instead of `prompt:set_name('fallback')`. The former is visually cleaner, but I don't necessarily like that it hides the fact that an imperative side-effect is going to take place. I will probably "dumb this down" as opposed to trying to use the pattern in other places in a uniform way. - The other is that my earlier claims about top-down React-style dataflow are pretty much not true any more. It _was_ true at the start, when each component rendered using data passed into it; now we have muddied the waters considerably with imperative methods. I will almost certainly want to revisit this topic in the future.
- Loading branch information
Showing
4 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters