-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Vieb bookmarks #391
base: master
Are you sure you want to change the base?
Vieb bookmarks #391
Conversation
This is what i have right now. The
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for starting work on this, looks fairly good, just a lot of small nitpick things 😉. Your overall approach and setup seem solid and correct. As for your other questions:
- Yes, all info should have a fallback, even if empty in some cases. Pretty much everything besides the url should be considered optional in a bookmark.
- Yes, if users don't want the info they can delete it later I think, unless you think a setting is needed as well.
- Only the url is required, so if there is no page url, we need the user to supply one (only for the newtab page actually, but other pages are all fair as the url fallback).
- Page title is fine to me, users can edit this later or set the title they want to.
- I would imagine adding a url field specifically to the bmadd command not being that common, as usually users would like to simply add the current page, not some other url. Having said that, it should still be supported. I'm also not that big of a fan of how the command currently looks with lots of arguments, initially I thought of automatically guessing what each argument of the bmadd command would be for, but with so many different fields/options to a bookmark that seems not possible, so we do need this actually. I think the tilde is fine, it needs to be escaped in proper urls anyway, and is not stored as such in the bookmarks file, so even if users can't add it with the command when they are not on the page, they can still add it when they ARE on the page or by editing the bookmarksfile. Equal signs should be allowed in the options, you can split each part on the
=
and take the first part as the name, then join the other parts with=
to get the remaining string with=
intact. - Commas seem like a good option to me. Ideally the tags should follow simpler naming rules, you can use the specialchars variable of
util.js
to check for characters that should be blocked. Maybe choose the one that does allow spaces.
Hopefully you can continue with all these comments and answers, let me know if anything is still unclear. Finally please also refer to my later comments in #100 for a general description of how it should work.
So now i've pushed an update where i started to add suggestions to the bookmark commands, it's still not working properly, i'm still not sure what's wrong, but i believe it's on the right track. Thanks for the feedback! |
Hello @Jelmerro good day! Can you explain what was the purpose that you intended for keywords, tags and names or how you expected them to work when you made the specifications on #100? This is so i can better understand what i should be aiming for, because right now i feel like i'm just kinda using the name as something like a keyword. Also what do you think of this idea:
Thanks! |
The tags and keywords should also be searchable using bmload, probably using the same syntax as bmadd, but i like the idea of just mentioning a tag and loading all of them. Not sure if the same should happen for keywords, but for tags that would be nice. The suggestions for bmload should help letting users know which bookmarks match their query, and load them all or just the one if selected. The big difference of tags and keywords, should be that tags can be colored and have their own set of keywords, see #100 (comment). This should be all the more useful once there is a bookmarks page to visualize the bookmarks in the folders, where they are shown with these tags in their own colors. |
I'm starting to work on the special page to manage bookmarks, and i ran into a roadblock that i haven't been able to solve. I'm trying to get the bookmark data from a function in So my guess is that this should be done via Any suggestion would be appreciated. As for the |
You are correct, I would like to recommend the newtab page as a quick and easy example on how to do ipc-renderer communication: https://github.com/Jelmerro/Vieb/blob/master/app/preload/newtab.js, you can find the other side of things in a range of places, but the first point of action is here: Line 867 in 6d06e23
Basically, from renderer to preload/pages you can do |
This was exactly what i needed, i'll be back when i get something working. Thanks a lot. |
Hey @yosoymau I hope you are well, I was wondering if you were planning to continue work on this PR. Thanks for the work so far, let me know if you need help with anything! |
Hello again, i'm back and i'll keep working on this, so expect to hear back from me soon. I apologize for my absence and leaving this halfway for such a long time. |
Welcome back, glad you are willing to continue work on it, just let me know if there's anything you need help with. I'm a bit inactive for the last weeks as well, I will be back in a few. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the current code, most of it looks very good, just some small suggestions so far. I'm very happy with your commitment to build this feature over the past years, let me know if I can help with anything.
} | ||
|
||
ipcRenderer.on("bookmark-data-response", (_, bookmarkData) => { | ||
// Create folder structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems redundant.
"use strict" | ||
const {ipcRenderer} = require("electron") | ||
|
||
// Create tree structure to keep track of added folders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems redundant.
@@ -350,6 +350,9 @@ body:not(#app) ::placeholder {color: var(--placeholder-text);} | |||
#downloadspage .misc {display: flex;margin: .5em;flex-direction: column;width: calc(100% - 1em);} | |||
#downloadspage .filelocation {cursor: pointer;} | |||
#downloadspage img {cursor: pointer;} | |||
/* Bookmarks */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bookmarks in lowercase here please.
const update = () => { | ||
ipcRenderer.sendToHost("bookmark-data-request") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const update = () => { | |
ipcRenderer.sendToHost("bookmark-data-request") | |
} | |
const update = () => ipcRenderer.sendToHost("bookmark-data-request") |
let currentCheckingFolder = tree | ||
folderElements.forEach(e => { | ||
// Ignore / because it already exists. | ||
if (e !== "/") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe filter these before doing the forEach? And possibly make this into a function as this is intended quite a bit.
{ | ||
"id": t, | ||
"keywords": [], | ||
"name": "" | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
"id": t, | |
"keywords": [], | |
"name": "" | |
} | |
) | |
{"id": t, "keywords": [], "name": ""}) |
// Check path format | ||
// Check color hex values | ||
// Check keywords and tags. | ||
// Single words? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume these are still on the TODO list? Let me know if you are stuck and/or need help to implement this :)
// Check keywords and tags. | ||
// Single words? | ||
|
||
if (badOptions.length !== 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (badOptions.length !== 0) { | |
if (badOptions.length) { |
[ | ||
"bmload", | ||
"bmdel" | ||
].forEach( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ | |
"bmload", | |
"bmdel" | |
].forEach( | |
["bmload", "bmdel"].forEach( |
const {getBookmarkData, | ||
validBookmarkOptions} = require("./bookmarks") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const {getBookmarkData, | |
validBookmarkOptions} = require("./bookmarks") | |
const { | |
getBookmarkData, validBookmarkOptions | |
} = require("./bookmarks") |
Still in development? |
I haven't seen @yosoymau around for a while, so this PR has been stale indeed. I am personally in no rush to get this implemented, but have outlined my proposal in the main ticket #100. I'm not going to rush @yosoymau to do it for us, they can take as long as they need to implement this huge feature, if at all, any contribution is optional and they shouldn't feel obliged to finish the PR, that's why it's still in draft as well. Feel free to pick up where this PR left and make a new one, or please wait for it to be done patiently. |
#100