ente icon indicating copy to clipboard operation
ente copied to clipboard

Add search bar within the Album selection screen

Open vishnukvmd opened this issue 1 year ago • 21 comments

Ref. mobile for implementation

vishnukvmd avatar Nov 26 '23 03:11 vishnukvmd

I would like to work on this issue. Please assign me.

Sanket-Arekar avatar Nov 26 '23 06:11 Sanket-Arekar

@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.

vishnukvmd avatar Nov 26 '23 06:11 vishnukvmd

Hi, can I try to work on this feature?

daviddeepan avatar Apr 15 '24 12:04 daviddeepan

Yes, if you wish!

mnvr avatar Apr 15 '24 12:04 mnvr

I did try work on this feature before commenting and produced this. Screenshot 2024-04-15 181028

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 ?

daviddeepan avatar Apr 15 '24 12:04 daviddeepan

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.

mnvr avatar Apr 15 '24 12:04 mnvr

While working with the SearchBar component I ran into this error- when I kept hitting backspace after clearing the search. Screenshot 2024-04-15 184234 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. ?

daviddeepan avatar Apr 15 '24 13:04 daviddeepan

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).

mnvr avatar Apr 15 '24 13:04 mnvr

This caught my eye because i kept hitting backspace. this fix sort it. Screenshot 2024-04-15 192133

daviddeepan avatar Apr 15 '24 13:04 daviddeepan

Sounds good! Yes, let's make that change too then.

mnvr avatar Apr 15 '24 14:04 mnvr

@mnvr is it okay if I PR that change first? given if I take time to implement the feature?

daviddeepan avatar Apr 15 '24 14:04 daviddeepan

Yes, let's do that

mnvr avatar Apr 15 '24 14:04 mnvr

@mnvr I have made that change and made a PR.

daviddeepan avatar Apr 15 '24 14:04 daviddeepan

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

daviddeepan avatar Apr 29 '24 12:04 daviddeepan

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!

mnvr avatar Apr 30 '24 03:04 mnvr

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.

mnvr avatar Apr 30 '24 03:04 mnvr

of course @mnvr I'll give it a go, thank you!

daviddeepan avatar Apr 30 '24 04:04 daviddeepan

@mnvr I have added a margin of 10px this is what the preview will look like. Screenshot 2024-04-30 103238

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.

daviddeepan avatar Apr 30 '24 05:04 daviddeepan

Okay, that's fine.

mnvr avatar Apr 30 '24 05:04 mnvr

@mnvr should I go ahead and make that change?

daviddeepan avatar Apr 30 '24 05:04 daviddeepan

Yes please

mnvr avatar Apr 30 '24 05:04 mnvr