Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Story] Certain links to open in a new tab #295

Open
5 of 9 tasks
angelcardoz opened this issue Oct 31, 2024 · 2 comments
Open
5 of 9 tasks

[Story] Certain links to open in a new tab #295

angelcardoz opened this issue Oct 31, 2024 · 2 comments
Labels

Comments

@angelcardoz
Copy link
Contributor

angelcardoz commented Oct 31, 2024

Epic

Epic issue includes overview, complete list of user stories, user testing task ideation, and final design mock-ups.

User story

  • As a filer, I want certain links to open in a new tab, so that I do not lose any data or progress when interacting with forms, tools, or processes on the page.

Acceptance criteria

  • Given that a user is logged in to our platform and the destination page does not require them to be logged in to our platform to view the content, then the link should open in a separate tab.
  • Given that a user is logged in to our platform and the destination page does require them to be logged in to our platform to view the content, then the link should open in the same tab.
  • Given that a user is not logged in to our platform, then the link should open in the same tab.

In this criteria "logged in to our platform" means that they are logged in to Keycloak, Login.gov, and they have been authenticated. Complete your user profile and the complete your user profile confirmation pages do not meet this criteria since the user has not been authenticated.

Tasks

Team members should create task issues in their respective repos and add links to those tasks below.

Data

  • Task (link)
  • Task (link)

UX

Front end

Ticket: Update when links open in new tab

  • Integrate logic into the SBL Link component that determines when to open a link in a new tab based on the Acceptance criteria set in [Story] Certain links to open in a new tab #295
  • Go through code and remove any overrides that force links to open in new tabs (Link > isExternalLink)
  • Add E2E tests for each link to verify it opens as expected (Same tab vs New tab)
    • Create clickNewTabWithRetry() - New utility to retry clicking of links that open in new tab until the target page actually loads

Back end

  • Task (link)
  • Task (link)
meissadia added a commit to cfpb/sbl-frontend that referenced this issue Jan 22, 2025
…1100)

Closes #1071 

## Changes

- New hook `useIsNewTabImplied` that determines when links should open
in new tabs
- Codifies logic outlined in
cfpb/sbl-project#295
- Update test utilities:
  - Rename to clarify their intent (`openLink`, `openLinkNewTab`)
  - New helpers (`expectLinkOpensSameTab`, `expectLinkOpensNewTab`)
- Add E2E tests to verify link targets on each page
  - Unauthenticated homepage
  - Complete your user profile
  - Authenticated landing page
  - View your user profile
  - View your financial institution profile
  - Updated your financial institution profile
  - Filing home for each filing step
    - Start filing
    - Resolve syntax errors
    - Resolve logic errors
    - Review warnings
    - Provide filing details
    - Sign and Submit
  - Filing homepage for each step of the Filing process
    - Provide type of financial institution 
    - Upload file
    - Resolve syntax errors
    - Resolve logic errors
    - Review warnings
    - Provide filing details
    - Sign and submit
@meissadia
Copy link
Contributor

This story has been implemented, verified, and merged on the SBL Frontend

cfpb/sbl-frontend#1100

@billhimmelsbach
Copy link
Contributor

Moving this to the epic/story column instead of in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants