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

Add option to display url if name is empty #2156

Closed
Emporea opened this issue May 11, 2024 · 9 comments
Closed

Add option to display url if name is empty #2156

Emporea opened this issue May 11, 2024 · 9 comments
Projects

Comments

@Emporea
Copy link

Emporea commented May 11, 2024

When having several bookmarks that have no name ( just identifying them by favico in the browser bookmarks menu bar ) it would be nice to have an option in the settings menu of the bookmarks nextcloud app to show the url in case the name is empty.
Some nextcloud instances disallow the fetching of favicons, so those bookmarks then become hard to determine and its not intuitive anymore.

Being able to see the link instead would be helpful.

@github-actions github-actions bot added this to Backlog in Bookmarks May 11, 2024
Copy link

Hello 👋

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app
in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with
less time for side projects like this one than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue
Cheers 💙

@Emporea
Copy link
Author

Emporea commented Jun 1, 2024

After upgrading to 14.1.0 this doesn't seem to work yet.
I also can not find any option in the admin or user settings regarding this.

After the upgrade I had this error in the logs, but I am unsure if this is related:

{"reqId":"xxx","level":3,"time":"2024-06-01T11:55:57+00:00","remoteAddr":"x.x.x.x","user":"someuser","app":"index","method":"GET","url":"/apps/bookmarks/folder/deleted","message":"Method OCA\\Bookmarks\\Controller\\InternalFoldersController::getFolder() does not exist","userAgent":"xxx","version":"29.0.1.1","exception":{"Exception":"ReflectionException","Message":"Method OCA\\Bookmarks\\Controller\\InternalFoldersController::getFolder() does not exist","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Utility/ControllerMethodReflector.php","line":52,"function":"__construct","class":"ReflectionMethod","type":"->","args":[["OCA\\Bookmarks\\Controller\\InternalFoldersController"],"getFolder"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":128,"function":"reflect","class":"OC\\AppFramework\\Utility\\ControllerMethodReflector","type":"->","args":[["OCA\\Bookmarks\\Controller\\InternalFoldersController"],"getFolder"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Bookmarks\\Controller\\InternalFoldersController"],"getFolder"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Bookmarks\\Controller\\InternalFoldersController","getFolder",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["deleted","bookmarks.internal_folders.get_folder"]]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/bookmarks/folder/deleted"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Utility/ControllerMethodReflector.php","Line":52,"message":"Method OCA\\Bookmarks\\Controller\\InternalFoldersController::getFolder() does not exist","exception":[],"CustomMessage":"Method OCA\\Bookmarks\\Controller\\InternalFoldersController::getFolder() does not exist"},"id":"xxx"}

@Emporea
Copy link
Author

Emporea commented Jun 1, 2024

Is it possible that the relevant line in the commit
<Item :title="bookmark.title || url"
should be
<Item :title="bookmark.title || bookmark.url"
?

@marcelklehr
Copy link
Member

Good thinking, but url is a computed property defined in the script block below, so it should work. Maybe your title is not empty but has some whitespace?

@marcelklehr marcelklehr reopened this Jun 1, 2024
@Emporea
Copy link
Author

Emporea commented Jun 1, 2024

No whitespaces. I checked a bunch of bookmarks that have no title.

Even creating a new bookmark, then manually removing the title results in the url not being shown. Maybe you can check if this works for you, but I assume you already did.

@Emporea
Copy link
Author

Emporea commented Jun 1, 2024

...
<template #title>
        <div class="bookmark__title">
                <h3 :title="bookmark.title">
                        {{ bookmark.title || bookmark.url }}
                </h3>
...

this works for me

@Emporea
Copy link
Author

Emporea commented Jun 6, 2024

Do you expect a PR? I would like for you to verify what I suggested before that. Otherwise I am not sure if that's a valid solution, even if it works in my environment.

@marcelklehr
Copy link
Member

Oh, no. I haven't had time to look into this further so far.

@marcelklehr
Copy link
Member

You were completely right :) I didn't realize the title prop was only used for editing the title. The actual display of the title is done in the #title slot, of course. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Bookmarks
Backlog
Development

No branches or pull requests

2 participants