diff --git a/.travis.yml b/.travis.yml index bdebecb2b..5aa5e95a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ before_install: - nvm install install: - bundle install --path vendor/bundle - - bundle exec rails runner bin/chromedriver-update - yarn install - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter diff --git a/app/assets/images/rainbowdev.svg b/app/assets/images/rainbowdev.svg new file mode 100644 index 000000000..904199ba9 --- /dev/null +++ b/app/assets/images/rainbowdev.svg @@ -0,0 +1,29 @@ + diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/articles.scss index b293739b6..320248ffe 100644 --- a/app/assets/stylesheets/articles.scss +++ b/app/assets/stylesheets/articles.scss @@ -1626,7 +1626,7 @@ } .feed-cta { - background: lighten($purple, 3%) !important; + background: lighten($purple, 6%) !important; border: 1px solid darken($bold-blue, 5%) !important; box-shadow: 5px 6px 0px darken($bold-blue, 15%) !important; .cta-container { @@ -1637,28 +1637,45 @@ text-align: center; margin-right: 9px; padding-right: 9px; - font-size: 1.3em; + font-size: 1.5em; + } + h3 { + text-align: center; + margin-right: 9px; + padding-right: 9px; + font-size: 17px !important; } - .button-container { margin-top: 40px; text-align: center; margin-right: 9px; padding-right: 9px; } + img.rainbowdevimage { + width: 190px; + height: 190px; + margin: 18px auto 35px; + border-radius: 22px; + display: block; + transform: rotate(6deg); + } .cta-button { text-align: center; margin: 5px; - width: 95px; - padding: 3px 8px; - font-size: 1.15em; + padding: 12px 5px; + min-width: 230px; + font-size: 1.1em; display: inline-block; height: auto; text-align: center; font-weight: bold; - border-radius: 3px; - border: 2px solid $black; - background-color: rgb(102, 226, 213); + border-radius: 100px; + background-color: $bold-blue; + color: white !important; + } + .feed-cta-sub { + margin-top: 20px; + font-size: 15px; } } diff --git a/app/models/organization.rb b/app/models/organization.rb index d3281193d..643350b13 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -31,7 +31,7 @@ class Organization < ApplicationRecord format: { with: /\A[a-zA-Z0-9\-_]+\Z/ }, length: { in: 2..18 }, exclusion: { in: ReservedWords.all, - message: "%{value} is reserved." } + message: "%{value} is a reserved word. Contact yo@dev.to for help registering your organization." } validates :url, url: { allow_blank: true, no_local: true, schemes: %w[https http] } validates :secret, uniqueness: { allow_blank: true } validates :location, :email, :company_size, length: { maximum: 64 } diff --git a/app/views/articles/tags/_main_feed.html.erb b/app/views/articles/tags/_main_feed.html.erb index 8640684d9..70f6011db 100644 --- a/app/views/articles/tags/_main_feed.html.erb +++ b/app/views/articles/tags/_main_feed.html.erb @@ -1,7 +1,4 @@ <% @stories.each_with_index do |story, i| %> - <% if !user_signed_in? && i == 4 %> - <%= render "stories/sign_in_invitation" %> - <% end %> <%= render "articles/single_story", story: story %> <% end %> <% if @stories.size > 1 %> diff --git a/app/views/organizations/_main_feed.html.erb b/app/views/organizations/_main_feed.html.erb index b60f7efea..85bcc99cf 100644 --- a/app/views/organizations/_main_feed.html.erb +++ b/app/views/organizations/_main_feed.html.erb @@ -1,8 +1,5 @@
<% @stories.each_with_index do |story, i| %> - <% if !user_signed_in? && i == 4 %> - <%= render "stories/sign_in_invitation" %> - <% end %> <%= render "articles/single_story", story: story %> <% end %> <% if @stories.size > 1 %> diff --git a/app/views/stories/_sign_in_invitation.html.erb b/app/views/stories/_sign_in_invitation.html.erb index 8fe2d6fdf..a796f041a 100644 --- a/app/views/stories/_sign_in_invitation.html.erb +++ b/app/views/stories/_sign_in_invitation.html.erb @@ -1,19 +1,22 @@
+ " />

- <% if @tag.blank? %> - Need more relevant posts?
Sign in to customize your feed: - <% else %> - dev.to is a community of
<%= number_with_delimiter User.count %> amazing humans who code. - <% end %> + DEV is a community of
<%= number_with_delimiter User.count %> amazing humans who code.

+

+ Create your profile to customize your experience and get involved. +

diff --git a/app/views/users/_main_feed.html.erb b/app/views/users/_main_feed.html.erb index 0eb9f4dcc..0c6eaddac 100644 --- a/app/views/users/_main_feed.html.erb +++ b/app/views/users/_main_feed.html.erb @@ -1,7 +1,4 @@ <% @stories.each_with_index do |story, i| %> - <% if !user_signed_in? && i == 4 %> - <%= render "stories/sign_in_invitation" %> - <% end %> <%= render "articles/single_story", story: story %> <% if i == 0 && @comments.any? %> <%= render "users/comments_section" %> diff --git a/config/initializers/reserved_words.rb b/config/initializers/reserved_words.rb index a30a4608b..9f8d482ac 100644 --- a/config/initializers/reserved_words.rb +++ b/config/initializers/reserved_words.rb @@ -188,7 +188,6 @@ class ReservedWords yes social rails - angular script work 1024 diff --git a/spec/support/initializers/capybara.rb b/spec/support/initializers/capybara.rb index b70d789b7..cdb5f555d 100644 --- a/spec/support/initializers/capybara.rb +++ b/spec/support/initializers/capybara.rb @@ -2,6 +2,7 @@ require "capybara/rails" require "capybara/rspec" require "webdrivers/chromedriver" +Webdrivers::Chromedriver.required_version = "74.0.3729.6" Webdrivers.cache_time = 86_400 Capybara.default_max_wait_time = 5 diff --git a/spec/system/articles/user_visits_articles_by_tag_spec.rb b/spec/system/articles/user_visits_articles_by_tag_spec.rb index eb9fb32a8..292c3fe11 100644 --- a/spec/system/articles/user_visits_articles_by_tag_spec.rb +++ b/spec/system/articles/user_visits_articles_by_tag_spec.rb @@ -57,14 +57,6 @@ RSpec.describe "User visits articles by tag", type: :system do create_list(:article, 3, tags: "javascript", user: author, published_at: Time.current) visit "/t/javascript" end - - it "shows the sign_in invitation", js: true do - within("#substories") do - expect(page).to have_content("amazing humans who code") - expect(page).to have_link("TWITTER") - expect(page).to have_link("GITHUB") - end - end end end diff --git a/spec/system/homepage/user_visits_homepage_articles_spec.rb b/spec/system/homepage/user_visits_homepage_articles_spec.rb index 32760850d..4cb7458d3 100644 --- a/spec/system/homepage/user_visits_homepage_articles_spec.rb +++ b/spec/system/homepage/user_visits_homepage_articles_spec.rb @@ -60,21 +60,6 @@ RSpec.describe "User visits a homepage", type: :system do articles.each { |a| a.update_column(:score, 31) } end - context "when unauthorized" do - before { visit "/" } - - include_examples "shows the sign_in invitation" - end - - context "when signed in" do - before do - sign_in user - visit "/" - end - - include_examples "no sign_in invitation" - end - describe "meta tags" do before { visit "/" } diff --git a/spec/system/organization/user_views_an_organization_spec.rb b/spec/system/organization/user_views_an_organization_spec.rb index 3da84512d..d059b4f5b 100644 --- a/spec/system/organization/user_views_an_organization_spec.rb +++ b/spec/system/organization/user_views_an_organization_spec.rb @@ -40,8 +40,6 @@ RSpec.describe "Organization index", type: :system do create_list(:article, 3, organization: organization) visit "/#{organization.slug}" end - - include_examples "shows the sign_in invitation" end end diff --git a/spec/system/shared_examples/no_sign_in_invitation.rb b/spec/system/shared_examples/no_sign_in_invitation.rb deleted file mode 100644 index f65f25aa6..000000000 --- a/spec/system/shared_examples/no_sign_in_invitation.rb +++ /dev/null @@ -1,9 +0,0 @@ -RSpec.shared_examples "no sign_in invitation" do - it "no sign_in invitation", js: true do - within("#substories") do - expect(page).not_to have_content("Sign in to customize your feed") - expect(page).not_to have_link("TWITTER") - expect(page).not_to have_link("GITHUB") - end - end -end diff --git a/spec/system/shared_examples/shows_sign_in_invitation.rb b/spec/system/shared_examples/shows_sign_in_invitation.rb deleted file mode 100644 index 060cdc435..000000000 --- a/spec/system/shared_examples/shows_sign_in_invitation.rb +++ /dev/null @@ -1,9 +0,0 @@ -RSpec.shared_examples "shows the sign_in invitation" do - it "shows the sign_in invitation", js: true do - within("#substories") do - expect(page).to have_content("Sign in to customize your feed") - expect(page).to have_link("TWITTER") - expect(page).to have_link("GITHUB") - end - end -end diff --git a/spec/system/user/view_user_index_spec.rb b/spec/system/user/view_user_index_spec.rb index 51c48d1ef..d623613b7 100644 --- a/spec/system/user/view_user_index_spec.rb +++ b/spec/system/user/view_user_index_spec.rb @@ -57,15 +57,6 @@ RSpec.describe "User index", type: :system do end end end - - context "when more articles" do - before do - create_list(:article, 4, user: user) - visit "/user3000" - end - - include_examples "shows the sign_in invitation" - end end context "when visiting own profile" do