User picture upload button

Hey everyone, as I would like to start contributing code to XWiki I started to work on updating the button that our users go to change their profile photo (the yellowish pencil+photo icon on top of the user picture). A small enough job to get acquainted to the workflow.

This button has some problems like:

  • It does not use the IconTheme, the image for the button is hardcoded.
  • It is a little bit “hidden”. At least it took me a while to find it on the page.

Screenshot 2024-02-07 at 09.33.46

So I would like to propose a small change here to the version below:

Screenshot 2024-02-07 at 10.43.34

I could also try to use the IconTheme here, but this means I would need to change the AttachmentSelector component, and this could turn in a much bigger task than I can handle alone without dev assistance. It also means that I could break something somewhere else without realizing.

I started a draft PR here, so if you have some suggestions on the code and design, please let me know. Thanks to @CharpentierLucas for the nice introduction on the workflow.

Thank you all for reading


Awesome! :slight_smile:

It would be probably better to actually fix the AttachmentSelector: we should have the same pencil icon than we have for editing profile IMO.

Hmmm… having a second thought: the button could be a bit hidden if displayed on top of a picture, so maybe it’s better to provide a link behind it.

And I think it makes sense to fix it once for all.
I don’t really recall about this part of the code but I can probably look to help if needed.