Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Add status and management UI for the event indexer #3672

Merged
merged 66 commits into from
Jan 27, 2020
Merged

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Nov 26, 2019

This PR implements some initial UI for our event indexer.
Things that are configurable/shown:

  • Enable/disable the crawler
  • Setting controlling how fast the room history is being downloaded.
  • See how much disk usage the event index is consuming
  • See if the crawler is currently downloading room history.

Some more things we might want:

As for configuring non-encrypted rooms we should consider if we want to allow users to index any type of room or limit it to non-public rooms or DMs only.

Rendered:

image

The settings have been crammed into the preferences tab of the user settings. This is most likely the completely wrong place to put them since we already have quite a large number of settings there.

A new tab for the settings was also considered but we may have enough tabs as well.

Please note that this PR depends on changes in Riot-web as well (element-hq/element-web#11529)

Fixes element-hq/element-web#11984

@ara4n
Copy link
Member

ara4n commented Dec 1, 2019

From a high level functionality perspective this looks great. I think we can afford to expose a little more information to the user to give them more visibility and a sense of control though (at least until we are confident this works seamlessly).

  • s/Enable message downloading/Download and index encrypted messages/
  • The number of indexed messages (570KB in 125,432 messages over 129 rooms; 248KB of index)
  • Listing the names of the rooms currently being indexed
  • Delete cache button

In terms of where it should sit in the UI - I'd have expected it to be in Security & Privacy alongside the rest of the E2E settings.

@nadonomy: can you provide a design for this please?

@nadonomy
Copy link
Contributor

nadonomy commented Jan 3, 2020

@poljar for when you're back after Christmas/New Years I've added a design proposal for the seshat UI here:

https://www.figma.com/file/wwqBo5oAFfk8XKmtd2YaIs/Cross-signing?node-id=2011%3A497

Let me know when you're back online on Matrix and we can iterate on some of the details. From the requirements I could gather from this issue, there's a few things that would be good to discuss:

  • Until we're clear of cross-signing dev, Settings in /develop doesn't represent the designs here, so we should quickly discuss where to place this within the 'Security & Privacy' tab in Settings in the meanwhile
  • I'm not sure that users have a good expectation of what a [Delete cache] button would actually do— e.g. would this automatically start downloading & unencrypting messages again? Or would that be user initiated? So I think it makes more sense to keep the interaction to [Disable] & [Enable] the feature, where doing so would clear the cache.
  • I'm not convinced of the utility of listing the names of the rooms messages are being fetched from; as the user can't manage any of it and it's problematic to scale if e.g. the user is in 1000 encrypted rooms.
  • Are we implementing this on iOS/Android?

@poljar
Copy link
Contributor Author

poljar commented Jan 7, 2020

Until we're clear of cross-signing dev, Settings in /develop doesn't represent the designs here, so we should quickly discuss where to place this within the 'Security & Privacy' tab in Settings in the meanwhile

I guess bellow the key backup section seems sensible?

I'm not sure that users have a good expectation of what a [Delete cache] button would actually do— e.g. would this automatically start downloading & unencrypting messages again? Or would that be user initiated? So I think it makes more sense to keep the interaction to [Disable] & [Enable] the feature, where doing so would clear the cache.

As it is, it would restart the download. Agree a Disable/Enable could be enough.

I'm not convinced of the utility of listing the names of the rooms messages are being fetched from; as the user can't manage any of it and it's problematic to scale if e.g. the user is in 1000 encrypted rooms.

Agree, a summary should be enough, but some type of marker could be nice for when a user looks at a specific room. Just some visual hint if messages are being downloaded or not.

Are we implementing this on iOS/Android?

Eventually, yes. No progress as of yet on that side though.

@poljar poljar force-pushed the poljar/seshat-ui-pr branch from d20bcbe to 8e26268 Compare January 21, 2020 12:39
@poljar
Copy link
Contributor Author

poljar commented Jan 21, 2020

Some progress here, refactored the main UI, moved it into the security tab of the settings and moved it into a modal.

I force pushed this after i locally rebased onto develop since the original PR was done on the old build system.

The disabling/enabling isn't yet hooked up.

Looks like this now:

image

Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

We're nearly there, just a few more things to tweak!

@poljar
Copy link
Contributor Author

poljar commented Jan 27, 2020

Updated now to have a red transparent cancel button on the disable dialog.

I left the border around the button since it seemed a bit weird not having it there. The colors aren't the transparent ones like in the figma but I assume we want to switch those around all at once and be consistent for now.

Updated screenshots follow:
image

image

image

@poljar poljar requested a review from jryans January 27, 2020 14:38
Copy link
Collaborator

@jryans jryans 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 overall! Feel free to adjust the links as mentioned and land; no need for another review.

Thanks for working on this! 😁

"with <nativeLink>search components added</nativeLink>.",
{},
{
'nativeLink': (sub) => <a href={nativeLink}>{sub}</a>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add target="_blank" rel="noopener" to this link and the one below so they open in new tabs.

@jryans jryans changed the title UI for the event indexer. Add status and management UI for the event indexer Jan 27, 2020
@poljar poljar merged commit ab8ea52 into develop Jan 27, 2020
@poljar poljar deleted the poljar/seshat-ui-pr branch June 21, 2020 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UI to control event indexing
4 participants