Skip to content
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

"Dependencies: -" if there are no dependencies (instead of "Dependenc… #438

Merged
merged 2 commits into from
Jun 25, 2020
Merged

"Dependencies: -" if there are no dependencies (instead of "Dependenc… #438

merged 2 commits into from
Jun 25, 2020

Conversation

hartmut27
Copy link
Contributor

@hartmut27 hartmut27 commented Apr 8, 2020

feature request issue #437

adjust the grey colored CodeLens label/information:
"Dependencies: -" if there are no dependencies (instead of "Dependencies:")

@hartmut27
Copy link
Contributor Author

image

@jaredly
Copy link
Owner

jaredly commented Apr 10, 2020

Cool, thanks for jumping on this! What do you think of changing it to something like This file has no dependencies in that case? I think that would be even more clear :)

Comment on lines 349 to 350
let depsString = depsList == [] ? "-" : String.concat(", ", depsList)
let lenses = (state.settings.dependenciesCodelens==true) ? [("Dependencies: " ++ depsString, topLoc), ...lenses] : lenses;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let depsString = depsList == [] ? "-" : String.concat(", ", depsList)
let lenses = (state.settings.dependenciesCodelens==true) ? [("Dependencies: " ++ depsString, topLoc), ...lenses] : lenses;
let depsString = depsList == [] ? "This file has no dependencies" : ("Dependencies: " ++ String.concat(", ", depsList))
let lenses = (state.settings.dependenciesCodelens==true) ? [(depsString, topLoc), ...lenses] : lenses;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we keep the additional text output minimalistic in this case please, since it affects the file header line and people read this so often; less is more, less prevents distracting.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm sure that's fine -- I just think the " - " is almost as confusing as not having anything. What about Dependencies: [none]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be nice :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworked this corresponding to your proposal in a new commit, same PR.

@jaredly jaredly merged commit f7d7a28 into jaredly:master Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants