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

feat: Nested Workspace Summary Categories #1144

Closed
wants to merge 0 commits into from

Conversation

aswa2ds
Copy link
Contributor

@aswa2ds aswa2ds commented Nov 6, 2023

enabled nested workspace summary categories. Categories with dots can be split to nested categories. And it's allowed to show the category title and file link in the same level category, like school.science --a file link-- and school.test --a category-- in the demo below . #973
image

And I found that some users wanna ignore some files in workspace summary. So do I. #953
Actually we can use the current ability to realize it. While the categories field was filled with empty list like: []. Like my index.norg file in the demo above. Because of the judge condition below. It hits no branch, and be ignored in the loop below the if-else. And I think it's more flexible than just configuring.
image
image

@vhyrro
Copy link
Member

vhyrro commented Nov 8, 2023

Generally the code looks good to me! Just one thing - it might make sense to precompute the value of lib.title(path) once in a variable (e.g. local path_as_title = lib.title(path)) and use it throughout the code instead of invoking it several times every time we need it. The lib.title() function is a bit expensive to run so it would be best if we could run it as few times as possible. If you could fix that up that would be great!

@aswa2ds
Copy link
Contributor Author

aswa2ds commented Nov 9, 2023

😞Had some stupid behaviors. It has been changed as you say. Sorry for ignoring the cost of repeat method call.

@vhyrro
Copy link
Member

vhyrro commented Nov 18, 2023

Huh, github seems to be messing things up. Didn't mean to close this, give me a moment :p

vhyrro added a commit that referenced this pull request Nov 18, 2023
@vhyrro
Copy link
Member

vhyrro commented Nov 18, 2023

Okay it seems like I messed something up. I merged the changes manually with the main branch because github apparently decided to autoclose this PR. I gave attribution in the commit message. Thank you for the pull request! 💜

vhyrro added a commit that referenced this pull request Nov 18, 2023
benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
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