-
-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zellij won't read config changes to locked mode #739
Comments
I think this is an issue of Zellij not reading the default configuration from ~/.config/zellij, because when I take this configuration and start zellij with |
Not yet! It's certainly something that is in our minds. |
I've used config.yml and not config.yaml (dropping the a) which caused the issue |
@a-kenji - thanks! Do you think we can accept both suffixes? |
Also if we can avoid fixing it for now and let some hacktoberfest people get involved it would be awesome :) |
@imsnif To quote from the documentation:
We already support multiple
In that order. That means we look for example for config files on linux in this order (excluding env vars and config options):
We already tell the user very clearly where the correct location is and even which location currently is loaded, try it out yourself:
If we now add and ambiguous name for config files we now need to look at twice the amount of locations, the config files need to have an order. Which one has precedence? I think we are already flexible enough in supporting multiple directories. This could lead to problems in people sharing configurations. This is all implicit behaviour and I would like it to be as clear as possible. So I would like to keep the name of the config file that we are loading to a single file, which name that is I don't really care. But I don't think multiple are a good way to go. |
Maybe you didn't read the documentation thoroughly,
One is never alone.
I don't really like that as well. Because why stop at At the end this was just a typo. |
From a user's perspective - don't you think it would be better if the app tells you what you're doing wrong rather than you hammering at the keyboard for hours until you notice a one letter difference in what you were typing and what's in the docs? IMO we should not stop at all. Given infinite developer time I'd like the app to tell me exactly what I'm doing wrong at all times (the rust compiler is a really good example of this btw). I think we can totally catch all the things that are reasonably a mistake here. To your specific questions:
IMO a good UX is having what the user expects to happen happen as much as reasonably possible. If a user fails to do something and we tell them they should read the docs more carefully, that's on us. It's great that you added a quickstart section. Maybe that would have mitigated it. But where's the harm in giving an error (or at least a warning) if you have a config.yml in a configuration folder we control? |
Did you try that?
And also you can try that:
|
@a-kenji - I'm not trying to be right here. I'm really just trying to create the best experience for potential users facing this same issue. If the setup told me that this configuration file would not be loaded, I still wouldn't necessarily understand what the issue is. I'd probably mostly be frustrated about why it's not loading my configuration file "which is clearly what is written in the docs!!111oneone" :) (a one letter difference in the middle of a word is really hard to spot if you don't know what you're looking for and don't have the context of a maintainer). If the setup can give you a warning about possible mistakes like we did above - that can also be a great solution. But if I don't know the setup command exists, how can I find out about it in the context of trying to get my configuration file to work? |
I agree, and I see that you are doing it. But I see myself as a user too and I try the same.
I agree, but It would frustrate me, if I had a file called differently in the folder and zellij would throw an error because of that. That would be implicit and hard to understand for me I believe.
The setup does tell you if the expected file is not there:
That is a very good point, I honestly thought it was so clearly visible that it is hard to miss. If I want to start zellij I want to have as little friction as possible, especially implicit friction. Back to the topic, to make the setup command more prominent I would rather And something I actually have been wanting to do for a while: Add to the goodbye screen: Instead of :
A small blurb, that says the default configuration was loaded,
|
As for @imsnif's point a very common example: I almost wanted zellij to generate a configuration file in While not the main conversation. I also believe supporting both yaml and yml is the best way. It is not the same as a normal edit distance as there is much open debate about yaml vs yml in the interweb. This is totally not needed if zellij does what I suggested before that. I didn't know about Thanks for putting so much thought and effort to the UX, it is very important in my mind and we should do what helps the user use zellij. Like we did in other places. |
Right. @a-kenji - I understand you not wanting to have Zellij open similarly named files by default or throw an error because they exist. I get it. That'll for sure be bad UX. While I think the setup command is really cool - it definitely is something you need to know about. No matter how prominent it is in the docs, if you're looking for something else you are very likely to glance over it. Even if it's literally one line above the thing you were looking for. That's how we as devs browse documentation - there's no avoiding that. :) What do you think - since this is a hot-button issue - that we look just at this one case and try to solve it? IMO, the main issue here is the "yml" vs. "yaml" endings. Both of which are acceptable and common endings. Here's an example of how "docker-compose" solves it:
For our case, this might be a little problematic because Zellij clears the terminal as soon as it starts. We could build a warning infrastructure that would sleep for a few seconds while displaying warnings (if they are there) and then start the app. But this seems like a lot of work for just one instance that we don't know if will be the first of many or not. How about we throw an error just for this case of yml vs. yaml? No Levenstein distance or anything. There will not be a slippery slope here. Just this one. Instead of supporting both like other tools (or at least like docker-compose), we'll just have this behaviour that will save users from this case? Clearly, users who don't know about setup hit this. Two maintainers hit this - one of whom did know about setup but wasn't thinking of using it (honestly, it was so obvious to me that the problem is elsewhere that I didn't even think of trying - us Humans are fallible and sometimes need to be spoon-fed... or at least I am :) ) |
This would be very easy to implement. All our config and layout errors are handled that way.
I am moderately OK with this, if I understand you correctly we want to error, if there is a |
I have this feeling that it will cause some issues with timings and such, but maybe I'm wrong. For sure this is a better way if you think it's easy to implement (I was kind of hoping to make this one of the issues for hacktoberfest).
My preference is that we support both and error if there's more than one. But I'm also okay with just erroring for config.yml. How can we change this so that you are more than moderately OK with it? |
Try it out yourself. On main put this into a file:
zellij --layout-path [PATH-TO-THE-FILE] All one needs to do is define an error struct, impl the error boilerplate and then return the error on deserialization when we encounter the file.
Decide on one, either |
Closing this for now, hopefully #771 will address this. |
I'm adding the alt options we have to the lock mode in order for them to be availble for me there. Changes aren't apply?
Side note: any way to refresh config without leaving zellij ?
Basic information
zellij --version
: 0.0.17tput lines
:40tput cols
:156uname -av
orver
(Windows):Darwin C02FX1QMMD6R 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64List of programs you interact with as,
PROGRAM --version
: output cropped meaningful, for example:alacritty --version
: alacritty 0.9.0Further information
Reproduction steps, noticable behavior, related issues etc
The text was updated successfully, but these errors were encountered: