learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
794 stars 656 forks source link

Navbar -> The person icon should lead to the personal info page #11273

Open ShivangRawat30 opened 1 year ago

ShivangRawat30 commented 1 year ago

Observed behavior

Currently the person icon does nothing.

Expected behavior

It should lead to the person's personal information page.

Steps to reproduce

  1. Go to Navbar
  2. Click the icon next to your registered username.

Context

Screenshot 2023-09-19 at 10 57 24 PM

Technical implementation

Because of Kolibri's plugin system, the user profile single page app is a separate and entirely optional plugin for Kolibri. This means that in some installations of Kolibri it could be disabled, or alternatively, that more advanced users may wish to replace it with a different plugin for managing the user profile.

In order to handle this, the link from the profile icon should not be hard coded to the user profile plugin. To achieve the desired effect, the following steps should be followed:

### Tasks
- [ ] Define a hook in kolibri/core/hooks.py to register as a UserProfile
- [ ] It should use the `only_one_registered` flag, so as to avoid a situation where multiple plugins are trying to register as the UserProfile link - see the core ThemeHook for an example of this: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/theme_hook.py#L33
- [ ] The hook should also define an abstract property for the URL that will be linked to, for an example of this on another hook see here: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/hooks.py#L50
- [ ] The registered hook's URL property should then be passed to the frontend through `plugin_data` in the core frontend: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/kolibri_plugin.py#L111
- [ ] This should then be picked up using the Javascript `plugin_data` import - if it is defined, then the icon and text should be clickable (https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/assets/src/views/AppBar.vue#L83) linking to the URL
- [ ] If not, neither should be clickable, and should display a regular pointer cursor.
- [ ] Finally, the UserProfile plugin will need to register against the new hook that has been defined in order to expose the appropriate URL - for an example of doing this, see registration against the role based redirect hook: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/plugins/user_auth/kolibri_plugin.py#L47

For more detailed information see the documentation about the plugin system here: https://kolibri-dev.readthedocs.io/en/develop/backend_architecture/plugins.html

yash1378 commented 1 year ago

can i work on this issue? if yes then can you please assign it to me

yash1378 commented 1 year ago

@ShivangRawat30 can i work on this issue

ShivangRawat30 commented 1 year ago

@yash1378 I lack the authority to delegate tasks to others since I am also a contributor. Regarding the issue I've raised, if it receives approval, I will be the one handling it.

MisRob commented 1 year ago

@jtamiace @tomiwaoLE Could you confirm that this is expected behavior before we assign to @ShivangRawat30?

MisRob commented 1 year ago

Hello @ShivangRawat30, thanks for your feedback, we appreciate it. From the UX point of view, it's definitely desired and our design team recommends doing so. We'll keep the issue open. However, we won't be opening it for contribution at this very point as there is some work that needs to happen in preparation for us to be able to achieve this eventually.

rtibbles commented 1 year ago

I've added some technical notes on appropriate implementation to the issue body.

nick2432 commented 10 months ago

Can I contribute to this issue? I'm new here, but I have experience contributing to many other organizations. Is there a Discord channel or any other channel where I can discuss and get assistance?

marcellamaki commented 10 months ago

Hi @nick2432 - thanks for your interest in contributing to Kolibri! This is a relatively in-depth issue due to how Kolibri is structured, so I'd suggest that it should be something to come back to and pick up once you are a little bit more familiar with our architecture, rather than a first contribution issue. Even if you are comfortable with open source contributions, I'd recommend getting started with a smaller issue or two, to get more familiar with Kolibri, and then if you'd still like to take on this issue, we would welcome your contribution! I think someone from our team has already directed you to our github discussions page which is a great place to learn more and talk with other community contributors and members of our team.

We currently have contributing opportunities in three repositories. You can see the contributing guidelines including links to issues suitable for contribution for each repository here:

nick2432 commented 10 months ago

@marcellamaki thank you

shivansh-bhatnagar18 commented 7 months ago

@MisRob @marcellamaki Looks like this issue still needs to be worked upon, so can you please assign this issue to me?

rtibbles commented 7 months ago

Yes, I have assigned you - please target any work to the release-v0.16.x branch, as I have targeted this issue for a future patch there.

shivansh-bhatnagar18 commented 7 months ago

@rtibble So should I submit my PR in the release X16.0 branch or continue pushing it in the develop branch.

shivansh-bhatnagar18 commented 7 months ago

Screencast from 2024-03-23 19-04-39.webm I have added the desired functionality here

bjester commented 7 months ago

@shivansh-bhatnagar18 please target the branch release-v0.16.x