Closed Rylon closed 5 years ago
The inconsistent hovers should be fixed in gem version 0.32.2. If you still experience the problem, please let me know.
A fix for the duplicate files in the documentation page is forthcoming.
Confirmed 0.32.2 fixes the inconsistent hovers 👍 thanks!
I'll keep an eye out for the documentation page fix too, mind if I keep this open until then?
Sure, no problem. I should have it fixed sometime in the next couple of weeks.
The latest gem fixes the file list on documentation pages.
Hi @castwide I just verified and it's fixed the duplicate lines for when the comment changes, however I think it's introduced a different issue. The lines now appear as arrays with the filename and line number as elements. If you change a class comment from one line to multi-lines, the class definition changes line number and you get a duplicate entry, for example:
Defined in:
∙ ["/path/to/my_class.rb", 3]
∙ ["/path/to/my_class.rb", 4]
Hope this helps!
Is this file in your workspace or a gem?
If it might be ambiguous, you can try go-to-definition on the same symbol and check the absolute path to the file it opens.
Hi, it's a file in my workspace, it's definitely the only file/class with that name.
Thanks. I'll give this another look.
Thanks, let me know if I can help with debugging. I can reproduce it by adding a single line comment above a class, hovering and clicking the link to get the documentation pages. Next add a second comment line above the class, the class has now moved down one line, hover again, click the link again, you’ll now see two entries for the same class with the previous and current line number shown.
Thanks for the additional information. The error only occurred when the method's location changed between page loads. I released gem v0.34.2 this morning. It should fix the problem.
Hi @castwide I just gave it a try and everything seems to be working as expected now. Thanks very much for your time and effort on this 👍
Hi, I'm experiencing an unusual issue which I've failed to pinpoint. It is to do with the Yard documentation which is shown when hovering over a class name or so on. Sometimes changes made to the docs don't show up immediately.
This is an example of what I'm doing to reproduce this:
If I hover over
MyClass
I will see the comment. If I then change the text "attempt number one" to "attempt number two" and hover overMyClass
again, I will still see the original text. Clicking on theMyClass
link inside the hover popup will open the docs, split to the right and will then show the correct text if I hover again.Interestingly, each time I click on the
MyClass
link, the documentation shows another entry with the class's filename in the 'Defined in:' section.I've not 100% sure why sometimes it works right away and other times it doesn't seem to work until I click on the link.
Sorry if the explanation isn't clear, I've attached a video zip showing it in action to hopefully clarify things 👍
Thanks!
example.mp4.zip