ente
ente copied to clipboard
Add search bar within the Album selection screen
Ref. mobile for implementation
I would like to work on this issue. Please assign me.
@Sanket-Arekar thanks!
Please check the mobile app for reference. The flow is triggered when you select one (or more) photo(s), and click on the "Add to album" or "Move to album" button.
Hi, can I try to work on this feature?
Yes, if you wish!
I did try work on this feature before commenting and produced this.
I did use the SearchBar
component but I wasn't able to integrate it, though I was able to render it.
This is simply an input
tag. Is it possible to use the SearchBar
component itself ?
I can't say off the top of my head. There's no hurry about this feature, if you have some minimal changes which implement this then please go ahead, otherwise you can wait for a bit and I'll see if I can look into details to answer your queries.
While working with the SearchBar
component I ran into this error- when I kept hitting backspace after clearing the search.
This error was also produced in the search in the navbar.
I fixed it by wrapping it around an
if
. Wanted to know if it was an issue on my side. ?
I think that's an existing bug, I've seen that too recently. So you can ignore it (though if you're looking at this stuff anyways, it'll be great if you could see why that happens too! Either ways, let's keep that in a separate PR, I don't think it's related to what you're trying to do).
This caught my eye because i kept hitting backspace.
this fix sort it.
Sounds good! Yes, let's make that change too then.
@mnvr is it okay if I PR that change first? given if I take time to implement the feature?
Yes, let's do that
@mnvr I have made that change and made a PR.
Hi @mnvr @vishnukvmd, I have attempted to make a search bar that does filter out existing albums. I'm not sure if this is what the team requires. Please do give it a look.
https://github.com/ente-io/ente/assets/82031202/8fa1e8e7-676b-48dd-b9a9-8f86f583cdc3
Looks good! I think it needs a bit more margin both vertical and horizontal, you could add a few pixels, don't worry about the exact value we can tweak it also after it is merged, but a bit more breathing space would be good.
Apart from that, if possible, it would be good if pressing escape can get rid of the focus (if that would be a simple change within this component, if that would require changing the things on a deeper level then that can be done separately to keep the scope of this album search bar minimal).
And do remember to test on mobile sized screens.
Thank you!
By margin I mean space between the entire search bar (from the white border) to the edges of the dialog (horizontally) and to the previous/next elements vertically.
of course @mnvr I'll give it a go, thank you!
@mnvr I have added a margin of 10px this is what the preview will look like.
And about the escape portion that you requested, I'm not sure I understood fully because so far when I hit ESCAPE, the dialogue closes with the existing code.
Okay, that's fine.
@mnvr should I go ahead and make that change?
Yes please