From b4e3f84607279438096b462b83749da9120bed03 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Wed, 30 Aug 2017 02:54:53 +0200 Subject: [PATCH] Replace main_stream with main-stream --- app/assets/javascripts/app/pages/profile.js | 2 +- app/assets/javascripts/app/router.js | 2 +- app/assets/javascripts/app/views/photos_view.js | 2 +- app/assets/javascripts/app/views/publisher_view.js | 2 +- .../color_themes/_color_theme_override_origwhite.scss | 2 +- app/assets/stylesheets/mobile/mobile.scss | 2 +- app/assets/stylesheets/stream_element.scss | 2 +- app/views/aspects/_aspect_stream.haml | 4 ++-- app/views/devise/passwords/edit.mobile.haml | 2 +- app/views/devise/passwords/new.mobile.haml | 2 +- app/views/people/show.html.haml | 2 +- app/views/people/show.mobile.haml | 2 +- app/views/photos/_index.mobile.haml | 2 +- app/views/registrations/new.mobile.haml | 2 +- app/views/sessions/new.mobile.haml | 2 +- app/views/streams/main_stream.mobile.haml | 2 +- app/views/tags/show.haml | 2 +- app/views/tags/show.mobile.haml | 2 +- features/desktop/hovercards.feature | 8 ++++---- features/desktop/likes.feature | 6 +++--- features/desktop/profile_photos.feature | 4 ++-- features/mobile/drawer.feature | 4 ++-- features/mobile/stream.feature | 2 +- features/step_definitions/comment_steps.rb | 4 ++-- features/step_definitions/keyboard_navigation_steps.rb | 2 +- features/step_definitions/notifications_steps.rb | 2 +- features/support/publishing_cuke_helpers.rb | 2 +- 27 files changed, 36 insertions(+), 36 deletions(-) diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index a2b814399..f4eb21b4f 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -11,7 +11,7 @@ app.pages.Profile = app.views.Base.extend({ subviews: { "#profile": "sidebarView", ".profile_header": "headerView", - "#main_stream": "streamView" + "#main-stream": "streamView" }, tooltipSelector: ".profile_button .profile-header-icon, .sharing_message_container", diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index ab9e11a69..60db01eeb 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -220,7 +220,7 @@ app.Router = Backbone.Router.extend({ app.page.setupAvatarFallback($(".main-stream-publisher")); } - $("#main_stream").html(app.page.render().el); + $("#main-stream").html(app.page.render().el); this._hideInactiveStreamLists(); }, diff --git a/app/assets/javascripts/app/views/photos_view.js b/app/assets/javascripts/app/views/photos_view.js index 8a31fc815..7390a357c 100644 --- a/app/assets/javascripts/app/views/photos_view.js +++ b/app/assets/javascripts/app/views/photos_view.js @@ -15,7 +15,7 @@ app.views.Photos = app.views.InfScroll.extend({ }, postRenderTemplate: function(){ - var photoAttachments = $("#main_stream > div"); + var photoAttachments = $("#main-stream > div"); if(photoAttachments.length > 0) { new app.views.Gallery({ el: photoAttachments }); } diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index baffa26da..c33d27602 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -108,7 +108,7 @@ app.views.Publisher = Backbone.View.extend({ this.viewGettingStarted = new app.views.PublisherGettingStarted({ firstMessageEl: this.inputEl, visibilityEl: this.$(".public_toggle .aspect_dropdown > .dropdown-toggle"), - streamEl: $("#main_stream") + streamEl: $("#main-stream") }); this.viewUploader = new app.views.PublisherUploader({ diff --git a/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss b/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss index 1d218888a..0b2a3dfaa 100644 --- a/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss +++ b/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss @@ -1,5 +1,5 @@ body { - #main_stream .stream-element { + #main-stream .stream-element { border: 0; border-bottom: 1px solid $border-grey; margin-bottom: 10px; diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index dc9958164..791fb9417 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -206,7 +206,7 @@ footer { padding: 0; } } -#main_stream { +#main-stream { .from { white-space: nowrap; overflow: hidden; diff --git a/app/assets/stylesheets/stream_element.scss b/app/assets/stylesheets/stream_element.scss index 7b9c5a117..a411c423e 100644 --- a/app/assets/stylesheets/stream_element.scss +++ b/app/assets/stylesheets/stream_element.scss @@ -61,7 +61,7 @@ } } -#main_stream .stream-element { +#main-stream .stream-element { margin-bottom: 20px; border: 1px solid $border-grey; box-shadow: $card-shadow; diff --git a/app/views/aspects/_aspect_stream.haml b/app/views/aspects/_aspect_stream.haml index 7154d0f50..902528710 100644 --- a/app/views/aspects/_aspect_stream.haml +++ b/app/views/aspects/_aspect_stream.haml @@ -8,10 +8,10 @@ = render "publisher/publisher", publisher_aspects_for(stream) - if current_user.getting_started? - .stream#main_stream{:title => popover_with_close_html("3. #{t('.stay_updated')}"), + .stream#main-stream{:title => popover_with_close_html("3. #{t('.stay_updated')}"), "data-content" => t(".stay_updated_explanation")} - else - .stream#main_stream + .stream#main-stream #paginate .loader.hidden diff --git a/app/views/devise/passwords/edit.mobile.haml b/app/views/devise/passwords/edit.mobile.haml index 883260bba..57f168682 100644 --- a/app/views/devise/passwords/edit.mobile.haml +++ b/app/views/devise/passwords/edit.mobile.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#main_stream.stream +#main-stream.stream .login-form .login-container = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| diff --git a/app/views/devise/passwords/new.mobile.haml b/app/views/devise/passwords/new.mobile.haml index 1f4f99b1c..e588d71d0 100644 --- a/app/views/devise/passwords/new.mobile.haml +++ b/app/views/devise/passwords/new.mobile.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#main_stream.stream +#main-stream.stream .login-form .login-container = form_for(resource, :as => resource_name, :url => password_path(resource_name)) do |f| diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 60e707010..4f2e40336 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -23,7 +23,7 @@ - if user_signed_in? && current_user.person.id == @person.id && !current_page?(person_photos_path(@person)) = render 'publisher/publisher', publisher_aspects_for(nil) - .stream.clearfix#main_stream + .stream.clearfix#main-stream -# JS #paginate diff --git a/app/views/people/show.mobile.haml b/app/views/people/show.mobile.haml index 29120725b..f35f81cfc 100644 --- a/app/views/people/show.mobile.haml +++ b/app/views/people/show.mobile.haml @@ -19,7 +19,7 @@ - if @post_type == :photos = render "photos/index", photos: @posts - else - .stream#main_stream + .stream#main-stream - if @stream.stream_posts.length > 0 = render "shared/stream", posts: @stream.stream_posts = render "shared/stream_more_button" diff --git a/app/views/photos/_index.mobile.haml b/app/views/photos/_index.mobile.haml index 0ab13e289..769000edf 100644 --- a/app/views/photos/_index.mobile.haml +++ b/app/views/photos/_index.mobile.haml @@ -2,6 +2,6 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#main_stream +#main-stream - for photo in photos = link_to image_tag(photo.url(:thumb_large)), person_photo_path(photo.author, photo), class: "thumbnail" diff --git a/app/views/registrations/new.mobile.haml b/app/views/registrations/new.mobile.haml index 5f39962b0..99c858cd2 100644 --- a/app/views/registrations/new.mobile.haml +++ b/app/views/registrations/new.mobile.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.stream#main_stream +.stream#main-stream - flash.each do |name, msg| .expose#flash-container .flash-message{class: "message alert alert-#{flash_class name}", role: "alert"} diff --git a/app/views/sessions/new.mobile.haml b/app/views/sessions/new.mobile.haml index b4422102d..e15f7af03 100644 --- a/app/views/sessions/new.mobile.haml +++ b/app/views/sessions/new.mobile.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.stream#main_stream +.stream#main-stream - flash.each do |name, msg| .expose#flash-container .flash-message{class: "message alert alert-#{flash_class name}", role: "alert"} diff --git a/app/views/streams/main_stream.mobile.haml b/app/views/streams/main_stream.mobile.haml index 0ef61801a..7b84c08e2 100644 --- a/app/views/streams/main_stream.mobile.haml +++ b/app/views/streams/main_stream.mobile.haml @@ -2,6 +2,6 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#main_stream.stream +#main-stream.stream = render 'shared/stream', posts: @stream.stream_posts = render 'shared/stream_more_button' diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml index e81ec8f7e..7df542990 100644 --- a/app/views/tags/show.haml +++ b/app/views/tags/show.haml @@ -28,7 +28,7 @@ - if current_user = render "publisher/publisher", publisher_aspects_for(@stream) - #main_stream.stream + #main-stream.stream #paginate .loader.hidden diff --git a/app/views/tags/show.mobile.haml b/app/views/tags/show.mobile.haml index 4afda991b..1194d0316 100644 --- a/app/views/tags/show.mobile.haml +++ b/app/views/tags/show.mobile.haml @@ -12,7 +12,7 @@ .btn.btn-danger.tag_following_action{data: {name: @stream.tag_name}} = t(".stop_following", tag: @stream.tag_name) -#main_stream.stream +#main-stream.stream = render 'shared/stream', :posts => @stream.stream_posts = render 'shared/stream_more_button' diff --git a/features/desktop/hovercards.feature b/features/desktop/hovercards.feature index 76313185a..6fff24f72 100644 --- a/features/desktop/hovercards.feature +++ b/features/desktop/hovercards.feature @@ -24,12 +24,12 @@ Feature: Hovercards Scenario: Hovercards on the main stream in reshares Given I sign in as "alice@alice.alice" And I am on "bob@bob.bob"'s page - Then I should see "Alice" within "#main_stream" - When I hover "Alice" within "#main_stream" + Then I should see "Alice" within "#main-stream" + When I hover "Alice" within "#main-stream" Then I should not see a hovercard When I am on "alice@alice.alice"'s page - Then I should see "Bob Jones" within "#main_stream" - When I hover "Bob Jones" within "#main_stream" + Then I should see "Bob Jones" within "#main-stream" + When I hover "Bob Jones" within "#main-stream" Then I should see a hovercard Scenario: Hovercards on the tag stream as a logged out user diff --git a/features/desktop/likes.feature b/features/desktop/likes.feature index eef1a4c4c..73227004d 100644 --- a/features/desktop/likes.feature +++ b/features/desktop/likes.feature @@ -17,12 +17,12 @@ Feature: Liking posts Then I should not have activated notifications for the post When I like the post "I like unicorns" in the stream Then I should see "Unlike" within ".stream-element .feedback" - And I should see a ".likes .media" within "#main_stream .stream-element" + And I should see a ".likes .media" within "#main-stream .stream-element" And I should have activated notifications for the post When I unlike the post "I like unicorns" in the stream Then I should see "Like" within ".stream-element .feedback" - And I should not see a ".likes .media" within "#main_stream .stream-element" + And I should not see a ".likes .media" within "#main-stream .stream-element" Scenario: Liking and unliking a post from a single post page @@ -39,4 +39,4 @@ Feature: Liking posts When I like the post "I like unicorns" in the stream And I sign out And I sign in as "bob@bob.bob" - Then I should see a ".likes" within "#main_stream .stream-element" + Then I should see a ".likes" within "#main-stream .stream-element" diff --git a/features/desktop/profile_photos.feature b/features/desktop/profile_photos.feature index 644b21ecf..f1e0699a7 100644 --- a/features/desktop/profile_photos.feature +++ b/features/desktop/profile_photos.feature @@ -31,8 +31,8 @@ Feature: show photos Scenario: I delete a photo When I am on "robert@grimm.grimm"'s photos page - Then I should see a ".thumbnail" within "#main_stream" + Then I should see a ".thumbnail" within "#main-stream" When I confirm the alert after I delete a photo - Then I should not see a ".thumbnail" within "#main_stream" + Then I should not see a ".thumbnail" within "#main-stream" When I am on "robert@grimm.grimm"'s page Then I should not see "Photos" within "#profile-horizontal-bar" diff --git a/features/mobile/drawer.feature b/features/mobile/drawer.feature index 700fc95b8..41bf76976 100644 --- a/features/mobile/drawer.feature +++ b/features/mobile/drawer.feature @@ -58,11 +58,11 @@ Feature: Navigate between pages using the header menu and the drawer And I click on "My aspects" in the drawer And I click on "All aspects" in the drawer Then I should be on the aspects page - And I should see "Hi you!" within "#main_stream" + And I should see "Hi you!" within "#main-stream" When I open the drawer And I click on "My aspects" in the drawer And I click on "Unicorns" in the drawer - And I should not see "Hi you!" within "#main_stream" + And I should not see "Hi you!" within "#main-stream" Scenario: navigate to the followed tags page When I follow the "boss" tag diff --git a/features/mobile/stream.feature b/features/mobile/stream.feature index 02301cd47..7a28892d7 100644 --- a/features/mobile/stream.feature +++ b/features/mobile/stream.feature @@ -13,4 +13,4 @@ Feature: Viewing the main stream mobile page When I sign in as "bob@bob.bob" on the mobile website And I go to the stream page Then I should see "Hello! I am #newhere" within ".ltr" - And I should see "less than a minute ago" within "#main_stream" + And I should see "less than a minute ago" within "#main-stream" diff --git a/features/step_definitions/comment_steps.rb b/features/step_definitions/comment_steps.rb index 0679e7b3d..585cb84f9 100644 --- a/features/step_definitions/comment_steps.rb +++ b/features/step_definitions/comment_steps.rb @@ -3,12 +3,12 @@ When /^I focus the comment field$/ do end Then /^the first comment field should be open/ do - find("#main_stream .stream-element .new-comment").should be_visible + find("#main-stream .stream-element .new-comment").should be_visible end Then /^the first comment field should be closed$/ do page.should have_css(".stream-element .media") - page.should_not have_selector("#main_stream .stream-element .new-comment", match: :first) + page.should_not have_selector("#main-stream .stream-element .new-comment", match: :first) end When /^I make a show page comment "([^"]*)"$/ do |comment_text| diff --git a/features/step_definitions/keyboard_navigation_steps.rb b/features/step_definitions/keyboard_navigation_steps.rb index 32188aff3..c7e9e3813 100644 --- a/features/step_definitions/keyboard_navigation_steps.rb +++ b/features/step_definitions/keyboard_navigation_steps.rb @@ -1,5 +1,5 @@ When /^I press the "([^\"]*)" key somewhere$/ do |key| - within("#main_stream") do + within("#main-stream") do find("div.stream-element", match: :first).native.send_keys(key) end end diff --git a/features/step_definitions/notifications_steps.rb b/features/step_definitions/notifications_steps.rb index bd38c03f0..6fbfde51f 100644 --- a/features/step_definitions/notifications_steps.rb +++ b/features/step_definitions/notifications_steps.rb @@ -7,7 +7,7 @@ When "I filter notifications by mentions" do end Then /^I should( not)? have activated notifications for the post( in the single post view)?$/ do |negate, spv| - selector = spv ? "#single-post-moderation" : "#main_stream .stream-element" + selector = spv ? "#single-post-moderation" : "#main-stream .stream-element" if negate expect(find(selector, match: :first)).to have_no_css(".destroy_participation", visible: false) expect(find(selector, match: :first)).to have_css(".create_participation", visible: false) diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index a6e0593ff..9b3dfe222 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -30,7 +30,7 @@ module PublishingCukeHelpers # wait for the publisher to be closed expect(find("#publisher")["class"]).to include("closed") # wait for the content to appear - expect(find("#main_stream")).to have_content(txt) + expect(find("#main-stream")).to have_content(txt) end def click_and_post(text)