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

Add Radial gauges and search components #19

Merged
merged 4 commits into from Mar 15, 2019
Merged

Conversation

riichb
Copy link
Collaborator

@riichb riichb commented Mar 14, 2019

What this does

  • Add Radial gauges and search components

Why did I do it?

  • These components were missing so we decided to add them

Todo before merge

  • N/a

Follow up tasks

  • Going to add more components in the future.
  • Not the best written code but it will do for now

After

Screen Shot 2019-03-15 at 10 27 04 AM

Screen Shot 2019-03-14 at 1 21 04 PM

@riichb riichb requested a review from haseebjkhan March 14, 2019 20:44
0
</text>
</g>
<text style="fill: #404040;font-weight: 600;" dy=".35em" text-anchor="middle" transform="translate(50, 85)">
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think the label should be baked into the SVG.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is copy & paste code but 100% agree!

@@ -0,0 +1,10 @@
<svg height="95" width="100">
Copy link
Owner

Choose a reason for hiding this comment

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

Confused why these values aren't both 100.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh, I think its because on the actual fleet code, they are scaling due to viewport size. Im actually just copying the rendered code from inspector tool. SVG is really good for this. https://css-tricks.com/scale-svg/

@@ -0,0 +1,3 @@
<div class="search-container">
<input class="search-input" type="text" placeholder="Search">
Copy link
Owner

Choose a reason for hiding this comment

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

Our placeholder conventions is Search…

Copy link
Owner

Choose a reason for hiding this comment

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

It helps the user distinguish between a placeholder label and a value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will make those changes. Thanks for catching!

width: fit-content;

.search-input {
background: url(../../images/icon/icon-20-o-search.svg) no-repeat 7px 7px;
Copy link
Owner

Choose a reason for hiding this comment

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

We should try keep to multiples of 4, even for background-position.

Why not use 50% for vertical alignment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When i looked at the source code, it showed 7px. Will make a fix.

I dont believe I was using the px value to vertical align the icon, more so get the correct size what I saw in the inspector tool

@karstenrowe
Copy link
Owner

@riichb nice work here. I left some feedback and leave @haseebjkhan for final review.

@karstenrowe
Copy link
Owner

Lastly, we should show an example of the radial gauge that isn't empty, maybe 50% full/complete.

…eedback and change px size to be multiples of 4
Copy link
Collaborator

@haseebjkhan haseebjkhan left a comment

Choose a reason for hiding this comment

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

Great work 👍
Just agree with @karstenrowe about adding a filled state for the gauge. Will do the job.

@karstenrowe karstenrowe merged commit edf5173 into master Mar 15, 2019
@karstenrowe karstenrowe deleted the addedComponents branch March 15, 2019 21:17
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.

None yet

3 participants