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

UX improvements to browser profile editing & creating view #1815

Merged
merged 25 commits into from
May 27, 2024

Conversation

SuaYoo
Copy link
Collaborator

@SuaYoo SuaYoo commented May 22, 2024

Resolves #438

Changes

  • Layout and design pass on profile detail view to better match other detail views
  • Ensures profile save buttons are always visible when creating or editing a profile
  • Handle temporarily disconnected browser pings
  • Enable recreating browser after it expires
  • Show confirmation dialog when attempting to navigate away from active browser
  • Tweak copy referencing profiles
  • Refactors profile-browser into TailwindComponent

Manual testing

  1. Log in as crawler
  2. Go to "Browser Profiles"
  3. Click "New Browser Profile"
    a. Fill form
    b. Click "Configure Browser Profile". Verify "Interactive Browser" loads with website
    c. Scroll up and down page. Verify "Finish Browsing" control bar is visible while interactive browser is visible
    d. Open dev tools and switch to offline mode. Verify alert message is shown
    e. Wait until screen turns gray and then switch back to online mode. Verify "Reload" button is shown
    f. Click "Reload". Verify browser profile URL is reloaded
    g. Click "Finish Browsing" and save. Verify profile saves as expected
  4. Click existing browser profile and repeat test steps 3c-3f.

Screenshots

Page Image/video
Browser Profile Detail (updated copy) Screenshot 2024-05-22 at 10 45 28 AM
Browser Profile Detail (updated action dropdown) Screenshot 2024-05-22 at 10 45 33 AM
Browser Profile Detail - Editing (tooltip hover) Screenshot 2024-05-22 at 10 50 31 AM
Browser Profile Detail - Editing - Cancellation dialog Screenshot 2024-05-22 at 10 51 13 AM
Browser Profile Detail - Editing (connection lost) Screenshot 2024-05-22 at 10 58 35 AM
Browser Profile Detail - Editing (browser expired) Screenshot 2024-05-22 at 10 50 36 AM
New Browser Profile Screenshot 2024-05-22 at 10 59 13 AM

Follow-ups

UX improvements to the browser profile detail layout and list view will be handled in #1816

@SuaYoo SuaYoo requested a review from ikreymer May 22, 2024 05:41
@SuaYoo SuaYoo changed the title Browser profile improvements UX improvements to browser profile editing & creating view May 23, 2024
@SuaYoo SuaYoo marked this pull request as ready for review May 23, 2024 01:28
@SuaYoo SuaYoo requested review from Shrinks99 and emma-sg May 23, 2024 01:29
Copy link
Member

@emma-sg emma-sg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well! Just a couple little changes to request.

Copy link
Member

@Shrinks99 Shrinks99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really great!! 2 tiny copy edits :)

</p>
<div class="py-2 text-center">
<sl-button size="small" @click=${this.onClickReload}>
<sl-icon slot="prefix" name="arrow-clockwise"></sl-icon>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to use "re-connect" instead of "reload" as the page isn't being reloaded and reloading can lead to data loss in other apps / contexts. Here it should continue the session, right?

Suggested change
<sl-icon slot="prefix" name="arrow-clockwise"></sl-icon>
${msg("Reconnect to Browser")}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if the session has ended, it will need to reload the browser, which can lead to data loss, but that's the only thing we can do.

frontend/src/features/browser-profiles/profile-browser.ts Outdated Show resolved Hide resolved
<btrix-alert variant="danger">
<p>
${msg(
`Interactive browser is offline. Waiting to reconnect...`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other suggestions would be in-line with this copy, which is good!

Copy link
Member

@Shrinks99 Shrinks99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title case buttons

frontend/src/pages/org/browser-profiles-detail.ts Outdated Show resolved Hide resolved
frontend/src/pages/org/browser-profiles-detail.ts Outdated Show resolved Hide resolved
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I think this is good to go!

@ikreymer ikreymer merged commit 8faf0ad into main May 27, 2024
2 checks passed
@ikreymer ikreymer deleted the frontend-browser-profile-expiry-handling branch May 27, 2024 23:57
ikreymer added a commit that referenced this pull request May 30, 2024
Follow up to #1815 

- Improved detection / responsiveness to unavailable browser
- Disable Save buttons when browser disconnected / unavailable
- Only add unload handler when browser is available
- Consistency between new and edit views: new profile view also has
cancel button with confirmation
- Don't show cancel confirmation if browser is already unavailable. 

Various text tweaks for consistency / accuracy:
- Save New Profile... to indicate new profile will be saved after dialog
- Load new browser to indicate new browser will be created
- Mention connection to browser is lost in disconnected message.

Also: migrated to LiteElement -> TailwindElement for browser-profiles-new

-------
Co-authored-by: emma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better handling of expired browser profiles
4 participants