diff --git a/app/components/sdg/goals/show_component.html.erb b/app/components/sdg/goals/show_component.html.erb
index 788e1319a..44dfebc21 100644
--- a/app/components/sdg/goals/show_component.html.erb
+++ b/app/components/sdg/goals/show_component.html.erb
@@ -9,11 +9,11 @@
- <%= render Widgets::Feeds::ParticipationComponent.new(feeds) %>
+ <%= render Widget::Feeds::ParticipationComponent.new(feeds) %>
<% if processes_feed %>
- <%= render Widgets::Feeds::FeedComponent.new(processes_feed) %>
+ <%= render Widget::Feeds::FeedComponent.new(processes_feed) %>
<% end %>
diff --git a/app/components/widgets/feeds/debate_component.html.erb b/app/components/widget/feeds/debate_component.html.erb
similarity index 100%
rename from app/components/widgets/feeds/debate_component.html.erb
rename to app/components/widget/feeds/debate_component.html.erb
diff --git a/app/components/widgets/feeds/debate_component.rb b/app/components/widget/feeds/debate_component.rb
similarity index 56%
rename from app/components/widgets/feeds/debate_component.rb
rename to app/components/widget/feeds/debate_component.rb
index 28d726811..908348c56 100644
--- a/app/components/widgets/feeds/debate_component.rb
+++ b/app/components/widget/feeds/debate_component.rb
@@ -1,4 +1,4 @@
-class Widgets::Feeds::DebateComponent < ApplicationComponent
+class Widget::Feeds::DebateComponent < ApplicationComponent
attr_reader :debate
def initialize(debate)
diff --git a/app/components/widgets/feeds/feed_component.html.erb b/app/components/widget/feeds/feed_component.html.erb
similarity index 100%
rename from app/components/widgets/feeds/feed_component.html.erb
rename to app/components/widget/feeds/feed_component.html.erb
diff --git a/app/components/widgets/feeds/feed_component.rb b/app/components/widget/feeds/feed_component.rb
similarity index 72%
rename from app/components/widgets/feeds/feed_component.rb
rename to app/components/widget/feeds/feed_component.rb
index cf476382a..847202350 100644
--- a/app/components/widgets/feeds/feed_component.rb
+++ b/app/components/widget/feeds/feed_component.rb
@@ -1,4 +1,4 @@
-class Widgets::Feeds::FeedComponent < ApplicationComponent
+class Widget::Feeds::FeedComponent < ApplicationComponent
attr_reader :feed
delegate :kind, to: :feed
@@ -15,11 +15,11 @@ class Widgets::Feeds::FeedComponent < ApplicationComponent
def item_component_class
case kind
when "proposals"
- Widgets::Feeds::ProposalComponent
+ Widget::Feeds::ProposalComponent
when "debates"
- Widgets::Feeds::DebateComponent
+ Widget::Feeds::DebateComponent
when "processes"
- Widgets::Feeds::ProcessComponent
+ Widget::Feeds::ProcessComponent
end
end
diff --git a/app/components/widgets/feeds/participation_component.html.erb b/app/components/widget/feeds/participation_component.html.erb
similarity index 75%
rename from app/components/widgets/feeds/participation_component.html.erb
rename to app/components/widget/feeds/participation_component.html.erb
index f19bd0e4f..e20bd6f34 100644
--- a/app/components/widgets/feeds/participation_component.html.erb
+++ b/app/components/widget/feeds/participation_component.html.erb
@@ -1,7 +1,7 @@
<% feeds.each do |feed| %>
<% if feed_proposals?(feed) || feed_debates?(feed) %>
- <%= render Widgets::Feeds::FeedComponent.new(feed) %>
+ <%= render Widget::Feeds::FeedComponent.new(feed) %>
<% end %>
<% end %>
diff --git a/app/components/widgets/feeds/participation_component.rb b/app/components/widget/feeds/participation_component.rb
similarity index 76%
rename from app/components/widgets/feeds/participation_component.rb
rename to app/components/widget/feeds/participation_component.rb
index f90b731c3..995e7bea0 100644
--- a/app/components/widgets/feeds/participation_component.rb
+++ b/app/components/widget/feeds/participation_component.rb
@@ -1,4 +1,4 @@
-class Widgets::Feeds::ParticipationComponent < ApplicationComponent
+class Widget::Feeds::ParticipationComponent < ApplicationComponent
attr_reader :feeds
def initialize(feeds)
diff --git a/app/components/widgets/feeds/process_component.html.erb b/app/components/widget/feeds/process_component.html.erb
similarity index 100%
rename from app/components/widgets/feeds/process_component.html.erb
rename to app/components/widget/feeds/process_component.html.erb
diff --git a/app/components/widgets/feeds/process_component.rb b/app/components/widget/feeds/process_component.rb
similarity index 57%
rename from app/components/widgets/feeds/process_component.rb
rename to app/components/widget/feeds/process_component.rb
index 5d9f79f0f..ab8065663 100644
--- a/app/components/widgets/feeds/process_component.rb
+++ b/app/components/widget/feeds/process_component.rb
@@ -1,4 +1,4 @@
-class Widgets::Feeds::ProcessComponent < ApplicationComponent
+class Widget::Feeds::ProcessComponent < ApplicationComponent
attr_reader :process
def initialize(process)
diff --git a/app/components/widgets/feeds/proposal_component.html.erb b/app/components/widget/feeds/proposal_component.html.erb
similarity index 100%
rename from app/components/widgets/feeds/proposal_component.html.erb
rename to app/components/widget/feeds/proposal_component.html.erb
diff --git a/app/components/widgets/feeds/proposal_component.rb b/app/components/widget/feeds/proposal_component.rb
similarity index 58%
rename from app/components/widgets/feeds/proposal_component.rb
rename to app/components/widget/feeds/proposal_component.rb
index 243bb0649..cbb6ae39b 100644
--- a/app/components/widgets/feeds/proposal_component.rb
+++ b/app/components/widget/feeds/proposal_component.rb
@@ -1,4 +1,4 @@
-class Widgets::Feeds::ProposalComponent < ApplicationComponent
+class Widget::Feeds::ProposalComponent < ApplicationComponent
attr_reader :proposal
def initialize(proposal)
diff --git a/app/views/welcome/_feeds.html.erb b/app/views/welcome/_feeds.html.erb
index e200d2c42..acd2f3e1f 100644
--- a/app/views/welcome/_feeds.html.erb
+++ b/app/views/welcome/_feeds.html.erb
@@ -1 +1 @@
-<%= render Widgets::Feeds::ParticipationComponent.new(@feeds) %>
+<%= render Widget::Feeds::ParticipationComponent.new(@feeds) %>
diff --git a/app/views/welcome/_processes.html.erb b/app/views/welcome/_processes.html.erb
index d6d3ee1ae..f4afb8bbf 100644
--- a/app/views/welcome/_processes.html.erb
+++ b/app/views/welcome/_processes.html.erb
@@ -1,7 +1,7 @@
<% @feeds.each do |feed| %>
<% if feed_processes?(feed) %>
- <%= render Widgets::Feeds::FeedComponent.new(feed) %>
+ <%= render Widget::Feeds::FeedComponent.new(feed) %>
<% end %>
<% end %>
diff --git a/spec/components/widgets/feeds/feed_component_spec.rb b/spec/components/widget/feeds/feed_component_spec.rb
similarity index 74%
rename from spec/components/widgets/feeds/feed_component_spec.rb
rename to spec/components/widget/feeds/feed_component_spec.rb
index 2e0d990e9..6eed7ef2a 100644
--- a/spec/components/widgets/feeds/feed_component_spec.rb
+++ b/spec/components/widget/feeds/feed_component_spec.rb
@@ -1,9 +1,9 @@
require "rails_helper"
-describe Widgets::Feeds::FeedComponent, type: :component do
+describe Widget::Feeds::FeedComponent, type: :component do
it "renders a message when there are no items" do
feed = double(kind: "debates", items: [])
- component = Widgets::Feeds::FeedComponent.new(feed)
+ component = Widget::Feeds::FeedComponent.new(feed)
render_inline component
@@ -15,7 +15,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
let(:feed) { Widget::Feed.new(kind: "debates") }
it "points to the debates path for homepage debates feeds" do
- component = Widgets::Feeds::FeedComponent.new(feed)
+ component = Widget::Feeds::FeedComponent.new(feed)
render_inline component
@@ -23,7 +23,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
end
it "points to the debates filtered by goal for goal feeds" do
- component = Widgets::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
+ component = Widget::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
render_inline component
@@ -35,7 +35,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
let(:feed) { Widget::Feed.new(kind: "proposals") }
it "points to the proposals path for homepage proposals feeds" do
- component = Widgets::Feeds::FeedComponent.new(feed)
+ component = Widget::Feeds::FeedComponent.new(feed)
render_inline component
@@ -43,7 +43,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
end
it "points to the proposals filtered by goal for goal feeds" do
- component = Widgets::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
+ component = Widget::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
render_inline component
@@ -55,7 +55,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
let(:feed) { Widget::Feed.new(kind: "processes") }
it "points to the legislation processes path for homepage processes feeds" do
- component = Widgets::Feeds::FeedComponent.new(feed)
+ component = Widget::Feeds::FeedComponent.new(feed)
render_inline component
@@ -63,7 +63,7 @@ describe Widgets::Feeds::FeedComponent, type: :component do
end
it "points to the legislation processes path for goal processes feeds" do
- component = Widgets::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
+ component = Widget::Feeds::FeedComponent.new(SDG::Widget::Feed.new(feed, SDG::Goal[6]))
render_inline component