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

can't figure out how to work with tagcloud... #4

Closed
BigbadHort opened this issue Feb 9, 2022 · 18 comments
Closed

can't figure out how to work with tagcloud... #4

BigbadHort opened this issue Feb 9, 2022 · 18 comments
Assignees
Labels
bug Something isn't working

Comments

@BigbadHort
Copy link

Hello!
I am very interested in your plugin, but unfortunately I can't figure out how to work with it...
Here is the code that I insert into the note:

---
title: tag_cloud
create: 2022-02-09_09'18
update: 2022-02-09_09'18
---
\`\`\`tagcloud
source: vault
\`\`\`

And here's what I get in view mode:

generating tag cloud

Maybe I didn't understand something with the syntax?

Some example would be very by the way!

@joethei
Copy link
Owner

joethei commented Feb 9, 2022

The syntax is correct, could you check if the console has any error messages?

To check for errors, first open the developer tools by pressing Ctrl-Shift-I on Windows/Linux or Cmd-Opt-I on macOS, and then go to the "Console" tab. If you want to save the error to a log file, you can right click on the error and choose "Save as...".

@jsmm
Copy link

jsmm commented Feb 14, 2022

Same here. Here is the console output:

VM181:1954 Uncaught (in promise) TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at TagCloudPlugin2.parseCodeblockOptions (eval at <anonymous> (app.js:1), <anonymous>:1954:26)
    at TagCloud.eval (eval at <anonymous> (app.js:1), <anonymous>:1711:35)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:50:61)
    at new Promise (<anonymous>)
    at __async (eval at <anonymous> (app.js:1), <anonymous>:34:10)
    at TagCloud.processor (eval at <anonymous> (app.js:1), <anonymous>:1709:43)
    at app.js:1
    at Function.e.postProcess (app.js:1)
    at e.postProcess (app.js:1)

@JuergenKaettnis
Copy link

JuergenKaettnis commented Feb 15, 2022

For me basically the same. I do not understand very well how to use. I suggest to add at least 3 examples to the documentation, one for every type of cloud.

Though I copied the above in a file, removed the "/" and get the same message. I am working with Android on Samsung S4 tablet. Does the plugin work with Android?

@joethei joethei self-assigned this Feb 15, 2022
@joethei joethei added bug Something isn't working documentation Improvements or additions to documentation labels Feb 15, 2022
@joethei
Copy link
Owner

joethei commented Feb 15, 2022

I am working with Android on Samsung S4 tablet. Does the plugin work with Android?

Yes the plugin does work on android(at least on mine).
I will do some investigation why this seems to fail sometimes.

@JuergenKaettnis
Copy link

Possibly the fault is on my side. I'll send the file to you I used for testing. I kept it as simple as possible. I send the original without commenting out or deactivating something. In this way you see what users like me don't understand or you see what might be wrong on the software side. Feel free to contact me for more info on my set up etc.
Tag Cloud.md

@JuergenKaettnis
Copy link

JuergenKaettnis commented Feb 21, 2022

I continued to experiment with the plugin. I created a new vault with nearly no other plugins and wrote the most basic syntax I can think of:
´´´wordcloud
ˋˋˋ
And it worked. In my other vault the same syntax is not working. I still have other vaults with more data and the plugin doesn't work. It stopps with the message "generating tagcloud". Turning of all other plugins doesn't change anything. Changing the theme doesn't do anything either.

If you need more information, feel free to refer back to me. If your plugin works, then it looks nice. I also tried it on an other mobile device (Samsung s8+ Smart phone) and an other vault and it works neatly. Any suggestions about the root of the problem?

One vault has 250 files, the other 506 and altogether 29 folders. Is that too much? The vault where the plugin works has 4 tags. The other vaults have much more. Could this be the issue?

If I export a big file from one of the vaults that is not working to the other vault, then the plugin works and works reasonably fast, though the file has quite some tags. What does this mean now?

Is there a syntax to limit the query on folder or on a singular file? If this works, then I probably just have to many data in these vaults.

@joethei
Copy link
Owner

joethei commented Feb 21, 2022

I don't think this is related to vault size, my test vault has ~12.000 files.

As you say that you are using the wordcloud, did you let it finish indexing before opening the note? (There is a notification the first time you enable the plugin)

You can restrict the plugin to only render a cloud for the current file with the source parameter.
(And the tag cloud also with a arbitrary dataview source)
You can also play with the minCount parameter by increasing and maxDepth parameter by decreasing.

@JuergenKaettnis
Copy link

I tried all kinds of clouds. I know a bit of dataview, but I am not to sure how to limit the query to one file.
I tried:

source:"Lesetexte/Sonstige/Haifisch"

I have the impression that in this vault there is no indexing. In the other vaults I saw the message already at the start.

@joethei
Copy link
Owner

joethei commented Feb 22, 2022

Limiting to the current file uses this syntax:

source: file

Limiting to a different file is currenlty not possible

Limiting to the results of a dataview source uses this syntax and only works for tagclouds.

source: query
query: "Lesetexte/Sonstige/Haifisch"

@JuergenKaettnis
Copy link

source: query
query: "Lesetexte/Sonstige/Haifisch"

Is this correct? I just wrote this into a markdown file, I mean a note created in Obsidian.

Just before I deleted and reinstalled the plugin. After reinstalling I saw the file count. When I use the command "recalculate word count"in the command pallette, then nothing happens

@JuergenKaettnis
Copy link

I tried the limitation to one file. It works as supposed to do in the vault the word cloud was working anyway and limited the query to the file. In the other vaults, it stops again and showing the message "generating ...cloud". I just cannot find, what is the difference between the two vaults. Maybe I try to turn off all other plugins?

@JuergenKaettnis
Copy link

JuergenKaettnis commented Feb 22, 2022

Same effect! All other plugins turned off, Dataview turned on and off. In this vault the same file does not work.

Now I don't know what else to try. Thank you for the help anyway.

joethei added a commit that referenced this issue Feb 22, 2022
~ improved error handling(references #4)
@joethei
Copy link
Owner

joethei commented Feb 22, 2022

I have done a few updates to the documentation
and also done a few small tweaks to the error handling, with some luck you will see something.

@joethei joethei removed the documentation Improvements or additions to documentation label Feb 22, 2022
@JuergenKaettnis
Copy link

One sentence: after installing the new update suddenly I have clouds. Thank you very much. Now I am really going to learn how to use (configuration). Anyway, they look great. First, I will look how to make the cloud bigger to see more details. Really happy! Do I have to close that line?

@joethei
Copy link
Owner

joethei commented Feb 22, 2022

Perfect,
@jsmm @BigbadHort does the lastest update also fix this for you?

@jsmm
Copy link

jsmm commented Feb 22, 2022

It works and looks good. Thanks.

@JuergenKaettnis
Copy link

Thanks to all of you.

@joethei joethei closed this as completed Mar 1, 2022
@BigbadHort
Copy link
Author

Perfect, @jsmm @BigbadHort does the lastest update also fix this for you?

its working for me now!!!
Tnx!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants