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

Header for cards and suggestions for aesthetic look #24

Open
tu2-atmanand opened this issue Nov 22, 2024 · 10 comments
Open

Header for cards and suggestions for aesthetic look #24

tu2-atmanand opened this issue Nov 22, 2024 · 10 comments

Comments

@tu2-atmanand
Copy link

tu2-atmanand commented Nov 22, 2024

I don't know if this will be going to effect the aesthetic look of the Card View, but still would like to discuss it, since it might be possible to blend it in.

  • The file name can be shown in this header.
  • The metadata can be shown in this header, as described further in the FR: Metadata display options #19
  • An option can be provided in the setting, whether the user wants to see the header or want to see the file name inside the content itself.

Now, I understand, putting a lot of things inside the card, make it looks very clumsy or over-bloated. And people liked Google Notes and all because their card UI is very clean. So to help with the aesthetic look :

  • The delete button is unnecessary and should be made optional as explained in the [FR] Make the Delete button optional to be shown #23
  • The pin button can be made hidden and will only be visible when the user will hover near the bottom corner.
  • Similar to the pin button, at the place of delete button, an open file button can be provided, which will be hidden just like pin button and will be used to open the note file. This is required, if the first requests made by me here has been implemented, that is to open the note by double click instead of single.
@tu2-atmanand tu2-atmanand changed the title Header for cards Header for cards and suggestions for aesthetic look Nov 22, 2024
@Nilati
Copy link

Nilati commented Dec 1, 2024

Hi, would it not perhaps be better to make a separate plugin than ask for all the changes you proposed in your beta to be baked into this one? The feature and aesthetic changes in your proposed beta version are pretty big changes and add a lot of code which can impact performance for some users.

@tu2-atmanand
Copy link
Author

Yeah, that make sense !

I am already in a development for two of my own plugins and are in process of submission for them. It takes a lot of time for a plugin to get published in the marketplace, by that time, users can only use Beta version through BRAT.

I found the idea of this plugin and its implementation to be very appealing. Hence, thought of implementing few essential features
to enhance its functionalities and to solve the issues users are facing right now.

Although I have tried to keep the performance and aesthetic feel of the plugin as good as the older version, still, if the author of this plugin do not accept my features, I am happy to publish it as my own plugin. I agree I went upgrading the plugin and have added a lot of code into it, but the idea was originally was from Jillro, so didn't felt like creating a same plugin again.

@Nilati
Copy link

Nilati commented Dec 1, 2024

For me, my use case is basically to keep it looking like what you see in Craft or Capacities, basically just a card. I always assumed this was jillro's intended aesthetic with it.

I've made a fork for my own use where I've added a settings option for specifying card height so they're uniform, added scroll ability as option in settings, and removed a lot of transitions as I don't need them and I prefer to keep things as basic as possible, as one of my laptops is a potato. I've also removed the pin/location/trash element as I'll never use it. It's great all the things you can do with it.

I was looking at your task board plugin earlier, I like the look of that.

@tu2-atmanand
Copy link
Author

I agree with keeping the plugin simple. I share the same mindset to make any software as efficient as possible to take the least amount of memory and CPU. This is the principles I always follow while building any software.

A user can use the plugin however they want and make their own version, but this is only possible for developers. A lot of Obsidian users are non-developers, so they might not able to have the small functionality which might drastically improve their workflow of using Obsidian on their own.

When you build any software for people, the one thing you need to always consider is to listen to your users/customers to expand the reach of the plugin. We can achieve the simplicity of by using settings, and use it the way we want, but it's important that, features requested by users are also integrated by making them optional of course.

I integrated most of the functionalities by seeing the feature requests and few topics from the Obsidian forum, such as this one : https://forum.obsidian.md/t/grid-layout-card-view-masonry-gallery/90600?u=tu2_atmanand

Anyways, nice to understand from you that you do consider performance in terms of resources usage, whereas most users don't worry about it and use their PC at high CPU just to render nice graphics with animations. (I personally turn off animations whenever possible as well).

That reminds me the Issue on this same topic, when user has thousands of notes and scrolls too long, it will stack up all the rendered cards in memory, I faced it, but it was not that noticeable, as I don't have a huge vault, but it might be something to take care of : #7

@huachuman
Copy link

huachuman commented Dec 6, 2024

Hi tu2, do you know about why there might be some performance issues when loading more than a few cards? It seems that after about 20 cards or so it starts to get really laggy and then eventually when you try to load a few more cards it freezes obsidian.

Also it has to load the cards every time the cards view loads. This also takes a good amount of time. Is there a chance to cache the cards or something to speed up loading?

@tu2-atmanand
Copy link
Author

tu2-atmanand commented Dec 7, 2024

The current algorithm to render the cards goes something like, first it loads 50 cards. Then, once you scroll down and reach to the end of these 50 cards view, more 50 is added and total of 100 cards are loaded altogether, and it goes on (which is needs to be fixed, sooner). But still, with this algorithm, I have loaded around 200 note's cards by scrolling, and haven't faced the issue you have mentioned. I would need more information, such as, whether your PC is low-end, how many total notes do you have in your vault and on average how much content is there in each note. But from reading the issues, I personally think, its something to do with your PC, Ill recommend open Task Manager or similar application and monitor, how much of your ram is getting consumed when the Obsidian freezes. If the Obsidian is freezing when the Ram consumption is very high, then it means, the bottleneck in your PC is your Ram.

Also it has to load the cards every time the cards view loads. This also takes a good amount of time. Is there a chance to cache the cards or something to speed up loading?

I have actually planned on focusing on this same topic, after I finished with the UI features, I am implementing right now. Because, for a small vault with few notes, the plugin might work smooth, but with huge vaults, it will be going to struggle a lot, with its current implementation. So, I have thought about few solutions to accomplish these issues.

Not exactly caching, since that don't seem to be possible to do right now, since Obsidian don't allow that (I guess). But I have three solutions, which should improve the performance drastically. Ill going to mention the same on the future releases of my beta versions.

@huachuman
Copy link

huachuman commented Dec 7, 2024

image

16GB LPDDR5 RAM not enough for this?

I do have thousands of notes, some of them are very long it's true.

@tu2-atmanand
Copy link
Author

(Hmm flex i see, my laptop looks like potato infront of yours, can't wait to buy my new pc setup)

Anyways, Now that its clear, the issue is definitely not with your PC. And if you are using the latest Obsidian 1.7.7, then the issue wont be with Obsidian either.

So the last thing you can do is try installing the Cards View plugin in the Sandbox Vault and see if there is any change. Let me know if there was any difference. Also you can try my Beta version separately by again opening the sandbox vault.

Also, was the issue from the beginning with this plugin or it started happening suddenly ?

@tu2-atmanand
Copy link
Author

I do have thousands of notes, some of them are very long it's true.

For the long notes' problem, i have the solution to only render few first lines from the notes along with if there is any image in the note at any place. This solution was suggested by one of the Cards View user. This should improve the rendering of cards timing, although wont be that noticeable. And for exploring all notes by continuous scrolling, I am working on it.

@tu2-atmanand
Copy link
Author

tu2-atmanand commented Dec 8, 2024

Hii @huachuman,

I have released a new version of the Cards View Beta version, as explained here : #27

In the version 2.1.0, I have implemented one of the optimization method I was discussion about in the above comments. In this new version I have added a functionality to set specific number of lines to be extracted from the original notes. This will help during the cards generating process, as only the first 20 lines will be extracted and rendered inside the cards. Also, I have disabled the post-processing thing, which should improve the performance as well.

In future I have planned to make the generating more and more cards as users scroll a little different way to consume less resources. Lets see how that will going to turn out. Because as of now, I havent felt any huge performance boost. A little difference I have surely seen in this latest 2.1.0 release, because of mentioned changes. But talking specifically about the problem you mentioned. I also tested the plugin with 10K files from here : https://github.com/Zettelkasten-Method/10000-markdown-files. And still havent faced any issue.

Let me know, if after testing with the sandbox vault, you have felt any difference. We will able to make the plugin robust, if we can solve all type of performance issue. I am looking forward for your valuable feedback to enhance the plugin further.

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

No branches or pull requests

3 participants