Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

Comments

Allow hiding annotations in the UI#177

Merged
prymitive merged 9 commits intomasterfrom
hide-annotations
Sep 7, 2017
Merged

Allow hiding annotations in the UI#177
prymitive merged 9 commits intomasterfrom
hide-annotations

Conversation

@prymitive
Copy link
Contributor

See README changes for details.
Fixes #169

hidden

</script>

<script type="application/json" id="alert-annotation">
<% var cls = "" %>

Choose a reason for hiding this comment

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

Why not use the <details> and <summary> elements?

<details open>
  <summary>Summary</summary>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</details>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cls is used to set hidden hidden-annotation if needed, not sure how <details> and <summary> relates to that


This variable is required and there is no default value.

#### ANNOTATIONS_DEFAULT_HIDDEN

Choose a reason for hiding this comment

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

Wouldn't it make more sense for these to be user-specific options configured in the UI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, but that would be an ugly UI if I dump it under current settings menu, so I'm not even going to try right now.

Annotations are just string maps, but to render those we need a bit more information (is it a link, should it be visible by default). Store them as more complex structs internally, this also allows us to drop alert.Links since we now have enough information to tell if annotation is a link
If user make annotation hidden by default, then render a button that allows to show it per label
This allows to signal to the UI which annotations to hide and which to show by default, user still can view hidden ones
Alert group needs more space after expanding, so we need to redraw everything.
@prymitive prymitive merged commit 0f4faec into master Sep 7, 2017
@prymitive prymitive deleted the hide-annotations branch September 7, 2017 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants