Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Improves snowflake effect #1940

Merged
merged 14 commits into from
Jul 3, 2015
Merged

Improves snowflake effect #1940

merged 14 commits into from
Jul 3, 2015

Conversation

gokul1794
Copy link
Contributor

This is how it looks like now,
snowing
This should fix #1562

@@ -17,7 +17,7 @@ attribution web => [ 'https://www.duckduckgo.com', 'DuckDuckGo' ],
github => [ 'https://github.com/duckduckgo', 'DuckDuckGo'],
twitter => ['http://twitter.com/duckduckgo', 'DuckDuckGo'];

spice to => 'http://isitsnowingyet.org/api/check/$1/key/{{ENV{DDG_SPICE_SNOW_APIKEY}}}';
spice to => 'https://duckduckgo.com/js/spice/snow/$1';
Copy link
Member

Choose a reason for hiding this comment

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

This isn't necessary.

The spice to url is where the actual request is made to. The duckduckgo.com/js/spice/snow/$1 call is re-written via NGXINX to the spice to url. This way the client makes a request to DDG and we in turn make a request to the API to maintain your privacy.

Please switch this back, otherwise the IA will break in production.

@moollaza moollaza assigned moollaza and unassigned chrismorast Jun 19, 2015
@gokul1794
Copy link
Contributor Author

Made the necessary changes, looks like this now and triggers normally!
navybluebackground
Don't you think #2980b9 looks better?
lightbluesnow
or maybe we need to change the text colour.

},
onShow: function(){
// add the snowflakes, if it's snowing
if(!api_result.is_snowing) { return; }
Copy link
Member

Choose a reason for hiding this comment

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

Nit: the closing brace should be on the line below:

if (...) {
 ...
} else {
 ...
}

@moollaza
Copy link
Member

@gokul1794 I'll let the design team decide on a color, but the Navy is definitely more legible.

@gokul1794
Copy link
Contributor Author

@moollaza All right :)

@gokul1794 gokul1794 changed the title Improves snowflake effect #1562 Improves snowflake effect Jun 22, 2015
@chrismorast
Copy link
Contributor

Looking great @gokul1794 ! Let's stick with the Gray background color. However, can we change the subtext to # 666? The white text is a bit difficult to read.

Any chance to get this up on a test machine to see the animation in action?

@gokul1794
Copy link
Contributor Author

@chrismorast, Is this okay?
666

But with the theme below, the main text and the base links are hard to read
dark

@chrismorast
Copy link
Contributor

@gokul1794 , the default theme version is good. Any chance we can change the BG color for the dark theme to #292929? @moollaza , maybe you can offer some insight here as to the best approach for that.

@moollaza
Copy link
Member

We need to use the 'tx-clr' and 'bg-clr' classes on the elements in order to make them look good across themes.

@moollaza
Copy link
Member

They should be covered on the docs under Spice display, variants

@gokul1794
Copy link
Contributor Author

@moollaza There's no mention of how to change the background color?

@gokul1794 gokul1794 closed this Jun 24, 2015
@gokul1794 gokul1794 reopened this Jun 24, 2015
@@ -11,6 +11,6 @@
font-weight: 900;
}

.zci--snow .zci__header {
color: inherit;
.c-base__content {
Copy link
Member

Choose a reason for hiding this comment

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

whoops, you need to keep the .zci--snow here to namespace the CSS. Otherwise you're potentially going to change all the content on the page that matches your selector:

.zci--snow .c-base__content {
   ...
}

@moollaza
Copy link
Member

@gokul1794 to target the dark theme in the CSS please prefix your rule with .dark-header:

.dark-header .zci--snow .foo {
   ...
}

@gokul1794
Copy link
Contributor Author

@chrismorast, Added, #292929 This is how it looks.
@moollaza I made the changes
dark

@gokul1794
Copy link
Contributor Author

@moollaza Our stylesheet?

@chrismorast
Copy link
Contributor

Hey @gokul1794 , one more thing... please use "tx-clr--dk2" as the class for the subtext (No snow is falling, sigh). That way it will auto update to a lighter color for the dark theme. Thank you!

@gokul1794
Copy link
Contributor Author

@chrismorast, Is this good enough?
subtext
subtext2

@gokul1794 gokul1794 mentioned this pull request Jun 30, 2015
@gokul1794
Copy link
Contributor Author

@moollaza Is this ready for merge?

@chrismorast
Copy link
Contributor

@gokul1794 , yes, that's good. However, I notice now that the notch in the light gray version is not adjusted to match. I'm not sure we've accounted for that in updating the BG color. What would the lighter gray version look like with f2f2f2 as the BG (the default color)? Would it be too subtle? I apologize for the last minute change.

@gokul1794
Copy link
Contributor Author

@chrismorast The problem with the default background color is that, the snowflakes aren't very visible!
lightsnow

@moollaza
Copy link
Member

moollaza commented Jul 3, 2015

@gokul1794 I spoke with Chris and we agreed that we're going to revert back to the default background colour for the normal theme, because altering the colour creates issues with the separator in the More at link and the notch in the tab.

I'll merge this and update. 👍


BTW, in the future, please make sure you've formatted/indented your code properly. It looks like the indentation is off in a few places here. I'll fix 😃

moollaza added a commit that referenced this pull request Jul 3, 2015
Improves snowflake effect
@moollaza moollaza merged commit 5bdd0ac into duckduckgo:master Jul 3, 2015
@gokul1794
Copy link
Contributor Author

@moollaza Sorry about that, I'll make sure it doesn't happen next time. Thanks! 👍

@moollaza
Copy link
Member

moollaza commented Jul 3, 2015

@gokul1794 its no problem 👍 -- Let your editor do all that hard work -- I have a sublime text package that strips trailing whitespace and another that re-indents the code. Together they do all the heavy lifting 😄

@moollaza
Copy link
Member

moollaza commented Jul 3, 2015

Continued in #1993

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.

Snow: Impove snowflake effect
4 participants