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

Provide UI Feedback when "Jump To Date" is in progress #21263

Open
BurnyBoi opened this issue Mar 2, 2022 · 12 comments
Open

Provide UI Feedback when "Jump To Date" is in progress #21263

BurnyBoi opened this issue Mar 2, 2022 · 12 comments
Labels
A-Jump-To-Date Jump to date headers or slash command A-Timeline O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Enhancement X-Needs-Design Z-Labs

Comments

@BurnyBoi
Copy link

BurnyBoi commented Mar 2, 2022

Your use case

What would you like to do?

When selecting a date to jump to, provide feedback that the jump is in progress in case there is a delay.

Why would you like to do it?

Currently, when selecting a jump that takes a while to do (Beginning of Room for example), there is nothing on the UI indicating that Element is working on the jump. If you wait a while, and even go to move to another room, it will eventually do the jump, but this can be confusing.

Have you considered any alternatives?

The best alternative would be if Jump To Date was always fast enough to never need a "loading" indicator, but it's understandable that it takes time.

Additional context

No response

@dbkr dbkr added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience A-Timeline labels Mar 2, 2022
@t3chguy t3chguy added the Z-Labs label Mar 2, 2022
@t3chguy
Copy link
Member

t3chguy commented Mar 2, 2022

and even go to move to another room, it will eventually do the jump, but this can be confusing.

This is another bug which needs fixing, if you change room it should not take you back out of it when it completes.

@Pattygeek

This comment was marked as off-topic.

@SimonBrandner

This comment was marked as off-topic.

@Pattygeek
Copy link

Pattygeek commented Apr 15, 2022

Hi @BurnyBoi please, Can you outline the steps to reproduce this bug?

@BurnyBoi
Copy link
Author

BurnyBoi commented Apr 30, 2022

Hi @BurnyBoi please, Can you outline the steps to reproduce this bug?

You need a room with a large amount of events spanning over a long time, and then attempt to jump to either a date really far in the past, or select Beginning of Room. If the room is large enough, it will take a long time for the jump to happen, and you'll be able to do other things on the UI while you wait (including going to another room)

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Mar 21, 2023

and even go to move to another room, it will eventually do the jump, but this can be confusing.

This is another bug which needs fixing, if you change room it should not take you back out of it when it completes.

This is being fixed by matrix-org/matrix-react-sdk#10405


In terms of indicating loading state (jump to date in progress), some prior art on UI patterns we could use:

src/components/structures/RoomStatusBar.tsx sticky at the bottom of the timeline:

src/components/views/rooms/DecryptionFailureBar.tsx sticky at the top of the timeline view:

We could share this pattern when:

  1. Page-loading with an event ID in the URL
  2. Navigating to a permalink /goto matrix.to
  3. Jumping from the thread panel to viewing the thread root in the main timeline via View in room
  4. Jumping to a pinned message
  5. Jumping from a search result
  6. Jumping from a message in the Notifications panel

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Mar 22, 2023

Here is a proof of concept (PoC):

A little inderterminate loading bar sliver the shows the loading state and transforms into a full bar like the decrypt failure bar explaining what's loading.

It starts as a little sliver for a few seconds so that it doesn't disrupt your visuals with a flash of something if requests are flowing fast as normal (no need to make the user think they missed some piece of information). But you still get an indication of what's going on. And will get more info if time elapses more than normal. Also slides away after request completes.

The date format could be improved imo but this is what formatFullDateNoDay gives at the moment.

As mentioned in the previous reply, we could apply this pattern to our other loading position in timeline scenarios.

PoC markup

Look for .mx_RoomView_auxPanel and put this markup in there to produce the output above. Toggle the expanded class to get the effect.

<div class="expanded">
  <div class="progress-bar">
    <div class="progress-bar-value"></div>
  </div>

  <div class="room-navigation-bar-wrapper">
    <div class="room-navigation-bar">
      <div class="mx_Spinner room-navigation-bar-icon">
        <div style="width: 32px; height: 32px;" class="mx_Spinner_icon"></div>
      </div>

      <div class="room-navigation-bar-message">
        <h3 class="room-navigation-bar-heading">Jumping to 3-14-2022 at 12-37-21 AM</h3>
        <p class="room-navigation-bar-description">
        Please wait while we find the closest event and load the messages in the room.
        </p>
      </div>

      <div class="room-navigation-bar-actions">
        <div class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_outline">Cancel</div>
      </div>
    </div>
  </div>
</div>

<style>
.room-navigation-bar-wrapper {
  overflow: hidden;
}

.room-navigation-bar {
  display: flex;
  padding: 12px;
  margin-left: 16px;
  margin-right: 16px;

  background-color: #f4f6fa;
  border-radius: 4px;

  transition: transform 225ms cubic-bezier(0, 0, 0.2, 1) 0ms;
  transform: translateY(-100%);
}

.expanded .room-navigation-bar {
    transform: translateY(0%);
}

.room-navigation-bar-icon {
  margin-right: 12px;
}

.room-navigation-bar-message {
  
}

.room-navigation-bar-heading {
  margin: 0;
  font-size: 16px;
}

.room-navigation-bar-description {
  margin: 8px 0;
  color: #737d8c;
}

.room-navigation-bar-actions {
  margin-left: 12px;
}
</style>

<style>
/* Based off of https://codepen.io/tmac/pen/QgVRKb */
.progress-bar {
  position: absolute
  overflow: hidden;
  width: 100%;
  height: 3px;
  background-color: #0dbd8b55;
  background-color: #e3e8f0;
}

.expanded .progress-bar {
  display: none;
}

.progress-bar-value {
  width: 100%;
  height: 100%;
  animation: indeterminate-animation 1s infinite linear;
  transform-origin: 0% 50%;

  background-color: #0dbd8b;
  background-color: #737d8c;
}

@keyframes indeterminate-animation {
  0% {
    transform:  translateX(0) scaleX(0);
  }
  40% {
    transform:  translateX(0) scaleX(0.4);
  }
  100% {
    transform:  translateX(100%) scaleX(0.5);
  }
}
</style>

MadLittleMods added a commit to matrix-org/matrix-react-sdk that referenced this issue Mar 24, 2023
 - Friendly error messages with details
 - Add a way to submit debug logs for actual errors (non-networking errors)
 - Don't jump someone back to a room they already navigated away from. Fixes bug mentioned in element-hq/element-web#21263 (comment)
@rufuskahler
Copy link

@MadLittleMods – This feels like an elegant design solution, reusing existing components. For additional context, can you please include details of the exact steps a user might take in order to jump to a new date?

Regarding copy – I'd suggest removing the precise details of the target date, and finding a synonym for 'event' that feels less technical.

@rufuskahler
Copy link

...struggling to discover the Jump To Date picker described here

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Mar 30, 2023

For additional context, can you please include details of the exact steps a user might take in order to jump to a new date?

If they use the jump to date separators:

  1. A user wants to jump to last week where they talked about something
  2. They scroll to the closest date separator and open the jump to date context menu
  3. Choosing "Last week" starts the jump process
  4. This sweeps them off their feet to their desired position in the room

If they use the /jumptodate slash command:

  1. A user wants to jump to last week where they talked about something
  2. They type /jumptodate 2023-03-23, then enter to activate the slash command
  3. This sweeps them off their feet to their desired position in the room

...struggling to discover the Jump To Date picker described matrix-org/matrix-react-sdk#10419

If you'd like to try jump to date yourself, you need to run through the Testing strategy explained in #10419 . It's unfortunately hard to enable at the moment since Synapse doesn't advertise stable support yet.

Regarding copy – I'd suggest removing the precise details of the target date, and finding a synonym for 'event' that feels less technical.

We could say message but then that duplicates message in the sentence and sounds a bit weird to me. We could also say position but that doesn't seem better and it's less precise. date could also work.

Here is a different iteration but it doesn't stand out to me as better:

Jumping to date

Please wait while we navigate to that position and load the messages in the room.

@rufuskahler
Copy link

@MadLittleMods – Having tested this out in situ, I believe your suggestion for the more concise copy is a better option, esp bearing in mind scenarios where the copy is displayed for very short time periods (e.g <1 second). Sharing some more ideas below, which sacrifice precision and visibility of system status for brevity and a focus on outcomes:

Jumping to date
Please wait while [content/messages] load/s.

Jumping to date
Please wait while the timeline reloads.

toomore pushed a commit to moda-gov-tw/matrix-org.matrix-react-sdk that referenced this issue Apr 6, 2023
 - Friendly error messages with details
 - Add a way to submit debug logs for actual errors (non-networking errors)
 - Don't jump someone back to a room they already navigated away from. Fixes bug mentioned in element-hq/element-web#21263 (comment)
@MadLittleMods
Copy link
Contributor

👍 I think this sounds pretty good (slight variation from "reloads" -> "loads"):

Jumping to date

Please wait while the timeline loads.

Thanks for trying it out @rufuskahler ! I'll assign you to the pull request when I get a chance to get it up ⏩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Jump-To-Date Jump to date headers or slash command A-Timeline O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Enhancement X-Needs-Design Z-Labs
Projects
None yet
Development

No branches or pull requests

8 participants