Skip to content

Style the silences list#809

Merged
stuartnelson3 merged 4 commits into
masterfrom
style-silences
May 22, 2017
Merged

Style the silences list#809
stuartnelson3 merged 4 commits into
masterfrom
style-silences

Conversation

@w0rm

@w0rm w0rm commented May 20, 2017

Copy link
Copy Markdown
Member

I styled the silences list so it looks in sync with the alert list. I also deleted some code.

There seems to be a bug with pending silences #783

silences

@w0rm w0rm requested review from mxinden and stuartnelson3 May 20, 2017 15:13
@mxinden

mxinden commented May 20, 2017

Copy link
Copy Markdown
Member

Fixes issue #808

@fabxc

fabxc commented May 21, 2017 via email

Copy link
Copy Markdown
Contributor

@w0rm

w0rm commented May 21, 2017

Copy link
Copy Markdown
Member Author

@fabxc thanks! I have another idea of how to improve the design. It requires changing the page background to gray, and highlighting the content blocks so they pop up. I would like to do it after this is merged.

@mxinden mxinden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some small things. Cool work!

SilenceFormNewRoute _ ->
text ""

_ ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To put this up for discussion: I would not render the "New Silence" button on the AlertList page, but only on the SilenceList page. This way interacting with silences is scoped to the silence related views. What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But I do like the idea of moving the "New Silence" button to the NavBar.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought about this:

  • Silence is the only resource that is manageable from the UI
  • Silence creation is one of the most important functions
  • Navigating to the silences page just so that the button appears in the header feels strange

Why not have it as a shortcut?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds reasonable. I am fine with either one. Let's wait if anyone has any objections and then merge.

a [ class <| "f6 link br1 ba mr1 mb2 dib " ++ classes ]
[ text content ]
labelButton : Maybe msg -> String -> Html msg
labelButton maybeMsg labelText =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 for making this consistent across pages.

@@ -1,9 +1,9 @@
module Views.Shared.SilenceBase exposing (view)
module Views.SilenceList.SilenceView exposing (view)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 Perfect, just like the AlertList view and AlertView. Thanks, forgot to change that in my previous PRs.

]
[ span [] [ text <| Utils.Date.timeFormat time ]
, small [] [ text <| Utils.Date.dateFormat time ]
[ text (string ++ " " ++ Utils.Date.timeFormat time ++ ", " ++ Utils.Date.dateFormat time)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to display the Silence state here? Isn't it already obvious by the new tabs in the Silence view?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not to display the silence state, but more to give a hint of what timestamp we show (start time or end time).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it, ok.

groupSilencesByState silences

tabView : State -> ( State, List a ) -> Html Msg
tabView currentState ( state, silences ) =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread ui/app/index.html
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.5.3/css/tachyons.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://use.fontawesome.com/b7508bb100.js"></script>
<style>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wow, no custom css except couple of inline stylings

@w0rm w0rm May 21, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that we have enough stuff in bootstrap. It may be limiting, but in a good way, because it enforces consistent look and feel.

@mxinden mxinden mentioned this pull request May 22, 2017

@stuartnelson3 stuartnelson3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

@stuartnelson3 stuartnelson3 merged commit 3074903 into master May 22, 2017
@stuartnelson3 stuartnelson3 deleted the style-silences branch May 22, 2017 11:36
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.

4 participants