-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace countdown component with sidebar partial
Previously we had a separate component to represent the countdown functionality, which was only used as part of the sidebar. Once the countdown has elapsed, the bulk of the component will become redundant, so it makes sense to incorporate it directly into the contextual sidebar since: - It's not intended for re-use - the design is coupled to how it appears as part of contextual navigation. - It's no longer a countdown, and no other naming is appropriate, given its single use case. Note this preserves all of the other behaviour of the component, including the button/focus.
- Loading branch information
Ben Thorner
committed
Dec 31, 2020
1 parent
6b77f43
commit b1cf0f0
Showing
13 changed files
with
67 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
app/views/govuk_publishing_components/components/_transition_countdown.html.erb
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %> | ||
<% link_text = t("components.related_navigation.transition.link_text") %> | ||
<% link_path = t("components.related_navigation.transition.link_path") %> | ||
|
||
<% data_attributes = { | ||
"module": "track-click", | ||
"track-category": "relatedLinkClicked", | ||
"track-action": "1.0 Transition", | ||
"track-label": link_path, | ||
"track-dimension": link_text, | ||
"track-dimension-index": "29", | ||
} %> | ||
|
||
<%= link_to link_path, | ||
class: "govuk-link gem-c-contextual-sidebar__brexit-cta", | ||
data: data_attributes, | ||
lang: shared_helper.t_locale("components.related_navigation.transition.title") do %> | ||
<h2 class="gem-c-contextual-sidebar__brexit-heading"><%= t("components.related_navigation.transition.title") %></h2> | ||
<p class="gem-c-contextual-sidebar__brexit-text"><%= link_text %></p> | ||
<% end %> |
17 changes: 0 additions & 17 deletions
17
app/views/govuk_publishing_components/components/docs/transition_countdown.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
lib/govuk_publishing_components/app_helpers/countdown_helper.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
spec/lib/govuk_publishing_components/app_helpers/countdown_helper_spec.rb
This file was deleted.
Oops, something went wrong.