Skip to content

Links leading outside Studio need to have a pop out icon #4606

Closed

Description

@MisRob

🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.

Observed behavior

Some links that lead outside Studio don’t have a pop-out icon. One example is the “API documentation” link (leading to https://ricecooker.readthedocs.io/en/latest/index.html) in Settings → Account:

links-1

There are more links with this problem.

Expected behavior

Links that lead outside the Studio have a pop-out icon. For example, the aforementioned link needs to appear as:

studio-link-after

This needs to be fixed for all links.

User-facing consequences

Visually distinguishing links leading to another website is widely recommended practice to minimize the surprise, and is an expected UX pattern in our products.

Guidance

  • Revisit all places where <KExternalLink>'s are used and ensure that all links that lead outside of Studio have openInNewTab set to truthy. Relatedly clean up target="_blank" since this is taken care of by openInNewTab.
  • Note that not all <KExternalLink>s are necessarily used for off-site navigation. Some of them are used to navigate between Studio sub-apps. Such links shouldn’t have truthy openInNewTab (and therefore not open in a new tab and neither have a pop-out icon) since from the user’s point of view, they behave like internal links.

Activity

  1. shivam-daksh commented on Jul 16, 2024

    @shivam-daksh
    Contributor

    Hey @MisRob , I would like to work on this.

  2. AlexVelezLl commented on Jul 16, 2024

    @AlexVelezLl
    Member

    Hi @shivam-daksh! Thank you for your interest in contributing to solving this Issue! I will assign it to you 👐. Let us know if you have any questions :).

  3. shivam-daksh commented on Jul 18, 2024

    @shivam-daksh
    Contributor

    Thanks @AlexVelezLl for assigning me this task. I've started working. I'm new here, so need little more time to explore.

  4. AlexVelezLl commented on Jul 18, 2024

    @AlexVelezLl
    Member

    Sure! @shivam-daksh No rush 😃.

  5. shivam-daksh commented on Jul 24, 2024

    @shivam-daksh
    Contributor

    Hey @AlexVelezLl , I'm having trouble in setting up the project despite going through the documentation and following the given instructions. Could you please guide me through?

  6. MisRob commented on Jul 25, 2024

    @MisRob
    MemberAuthor

    Hi @shivam-daksh, I'm sorry to hear that. We will try to help. Would you upload terminal output from your setup (ideally full one) and also mentioned what operating system you use?

  7. shivam-daksh commented on Jul 25, 2024

    @shivam-daksh
    Contributor

    Hi @MisRob, I've attached the terminal output file along with the screen recording. Please let me know the steps to fix it.
    terminal_output.txt

    Screen.Recording.2024-07-25.at.1.49.44.PM.mov
  8. AlexVelezLl commented on Jul 25, 2024

    @AlexVelezLl
    Member

    Hey @shivam-daksh, it seems like you are following the wrong docs 😅, can you try following the instructions at https://github.com/learningequality/studio/blob/unstable/docs/local_dev_docker.md? which are instructions for local development. Let us know if you are still experiencing those problems :)

  9. shivam-daksh commented on Jul 25, 2024

    @shivam-daksh
    Contributor

    Hey, I'm getting this error after running:
    pip install -r requirements.txt -r requirements-dev.txt
    image

  10. 5 remaining items

  11. shivam-daksh commented on Aug 2, 2024

    @shivam-daksh
    Contributor

    HI @MisRob, I've found two ways to fix this issue:

    1. Replacing <KExternalLink/> component with <ActionLink/>. This is same as used in this navigation drawer:

    image

    The result after:

    image

    2. Placing the KIconButton component as child in KExternalLink component.

    The Result after:

    image

    Which one should I proceed with?

  12. MisRob commented on Aug 2, 2024

    @MisRob
    MemberAuthor

    Hi @shivam-daksh, thanks, looking good! Please go with option (1) - that's the standard way.

  13. shivam-daksh commented on Aug 2, 2024

    @shivam-daksh
    Contributor

    Hi @MisRob, It's done. Check this:

    Screen.Recording.2024-08-02.at.2.42.09.PM.mov
  14. MisRob commented on Aug 2, 2024

    @MisRob
    MemberAuthor

    @shivam-daksh overall looks like an expected behavior when it comes to appearance of links, so that's good! However I believe there's still some work in regard to links targets, right? I don't think they should all lead to learningequality.org. Their original targets need to be preserved.

  15. shivam-daksh commented on Aug 2, 2024

    @shivam-daksh
    Contributor

    Hi @MisRob , Check now:

    Screen.Recording.2024-08-02.at.3.10.34.PM.mov
  16. MisRob commented on Aug 2, 2024

    @MisRob
    MemberAuthor

    Yes, that looks like expected behavior @shivam-daksh

  17. shivam-daksh commented on Aug 2, 2024

    @shivam-daksh
    Contributor

    Thankyou @MisRob for reviewing, Should I send merge request now? If yes, is there anything I've to do?

  18. MisRob commented on Aug 2, 2024

    @MisRob
    MemberAuthor

    @shivam-daksh Yes, you can open a pull request and we will then review it. We can't recognize everything from the recording, even though it definitely looks like a good start.

  19. MisRob commented on Aug 2, 2024

    @MisRob
    MemberAuthor

    @shivam-daksh Just follow the pull request template and provide information that you can - that's all :)

  20. shivam-daksh commented on Aug 2, 2024

    @shivam-daksh
    Contributor

    Thank you @MisRob, I've sent the merge request. #4622

  21. ozer550 commented on Aug 6, 2024

    @ozer550
    Contributor

    The links are working as expected and I see the necessary pop-out icons too altho I came across instance where we do not have a space after the period here.

    image

  22. shivam-daksh commented on Aug 6, 2024

    @shivam-daksh
    Contributor

    Hi @ozer550 , thank you for identifying this. Now, I've fixed it by adding a space. Please review it again and let me know if there are any other changes required.
    Insert space after period in Settings>Storage page

  23. added a commit that references this issue on Aug 9, 2024
  24. rtibbles commented on Aug 9, 2024

    @rtibbles
    Member

    Fixed in #4622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions