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

Only show "This data was chached at..." when there's a problem #13

Closed
christophfriedrich opened this issue Mar 13, 2019 · 8 comments
Closed

Comments

@christophfriedrich
Copy link
Collaborator

Currently, the "This data was cached at..." information is output quite prominently:

image

And that although it's usually not that interesting.

We could remove it from the output for the standard case (the user will assume the data is up-to-date anyway) and only show it when e.g. the data is older than 12 hours or the last crawl failed. And then we should display it with a warning sign like ⚠️

@m-mohr
Copy link
Member

m-mohr commented Mar 13, 2019

I'd actually just put a warning sign after the title of the back-end and put the description with the cache time in a tooltip.

christophfriedrich added a commit that referenced this issue Mar 26, 2019
Like @m-mohr suggested: "Put a warning sign after the title of the back-end and put the description [...] in a tooltip". The text is a bit more generic though: It doesn't show the crawl time, but just the statement that the data is older than the configured threshold. Likewise, it just states that the backend was recently unavailable for crawling, not how often this was the case or when the last successful crawl was.

This commit introduces a new config option `flagWhenOlderThanXHours`.
christophfriedrich added a commit that referenced this issue Mar 26, 2019
DataRetrievedNotice's output is now smaller and gray (instead of black) so that it is less prominent.
UnsuccessfulCrawlNotice now has a clearer text and doesn't nudge the previous element anymore.
@christophfriedrich
Copy link
Collaborator Author

I'd actually just put a warning sign after the title of the back-end and put the description with the cache time in a tooltip.

I like the idea to have a warning sign after the title. I implemented that:

grafik

It shows when

  • unsuccessfulCrawls is higher than or equal to config.unsuccessfulCrawls.flagAfter

and/or

  • retrieved is more than config.flagWhenOlderThanXHours hours ago.

But I didn't delete the DataRetrievedNotice in general -- I think it's fair to tell users that the data they see is not live but cached. Since the backends are now collapsed by default, the text isn't that prominent anymore anyway. And on top of that I made it smaller and gray so that it is even less prominent.

@m-mohr What do you think?

@m-mohr
Copy link
Member

m-mohr commented Mar 28, 2019

This is much better than before. The only thing that bugs me is that we now have three places with very similar information. I'd merge the red and grey texts and only show it in case there is a problem. I'd expect from portals/search engines that data is not live but cached... (it's the same in Google and most other portals, too).

christophfriedrich added a commit that referenced this issue Mar 29, 2019
The DataRetrievedNotice component was re-dedicated: So far it was *always* shown as an informative text, now it is displayed as a warning and only shown when the data is old.

Thus the restyling from "small, italic and grey" to "normal font size and style but red color".

In order to group similar information together, I moved all occurrences of `DataRetrievedNotice` next to the related `UnsuccessfulCrawlNotice`s.

And then I moved the two notices "beyond the break", i.e. they are only visible once the backend/collection/process has been expanded. This is still eye-catching enough because their presence is indicated by a warning sign next to the backend name, which is always visible.
@christophfriedrich
Copy link
Collaborator Author

christophfriedrich commented Mar 29, 2019

I'd merge the red and grey texts and only show it in case there is a problem.

Oookay 😉

Done:

grafik

The warning texts are always "behind the fold" i.e. only shown when the backend/collection/process is expanded (which is still obvious enough as their presence is indicated by the warning sign next to the backend name). Whether they are shown is determined by the flagWhenOlderThanXHours and unsuccessfulCrawls.flagAfter config options.

@m-mohr
Copy link
Member

m-mohr commented Mar 29, 2019

Better, but why don't we put it into a single paragraph?

@christophfriedrich
Copy link
Collaborator Author

Because they are two different things that can happen independent of each other.

@m-mohr
Copy link
Member

m-mohr commented Apr 1, 2019

The first issue implies the other, so a single message should be enough. It could be expanded though, for example:

  1. [If crawling failed]: The data was collected 4 days ago as the backend was recently unavailable.
  2. [If the data is just outdated]: The data was collected 4 days ago as openEO Hub could not [rough reason].
  3. Otherwise nothing.

@christophfriedrich
Copy link
Collaborator Author

I opened a new issue because "as openEO Hub could not [rough reason]" requires that the reason is known to the Hub itself.

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

No branches or pull requests

2 participants