A platform for community discussion. Free, open, simple.
FIX: Restore styles in finish-installation route (#34420)
Penar Musarajf325d8f467e8
diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scssindex 4f11e9afd1a..c40d1e15949 100644--- a/app/assets/stylesheets/wizard.scss+++ b/app/assets/stylesheets/wizard.scss@@ -300,16 +300,6 @@ body.wizard {background-color: var(--primary-medium);}- &__button.primary {- background-color: var(--tertiary);- color: var(--secondary);-- @include viewport.until(sm) {- order: 1;- margin-left: 0;- }- }-&__button.finish {@include viewport.until(sm) {order: 2;@@ -607,15 +597,14 @@ body.wizard {.help-text {margin: 2em 0;}-- .primary {- display: inline-block;- }}}-// Register admin page... /finish-installation/register+// Register admin pages+// /finish-installation and /finish-installation/register.wizard-container-contents.finish-installation {+ font-family: var(--font-family);+.wizard-container__combobox {background: var(--secondary);color: var(--primary);@@ -633,4 +622,39 @@ body.wizard {.wizard-container__text-input {color: var(--primary);}++ .wizard-container__button {+ border-radius: 2px;+ border: 0;+ padding: 0.5em;+ transition: var(--d-button-transition);+ text-decoration: none;+ background-color: var(--secondary);+ color: var(--primary-very-high);+ cursor: pointer;++ &.btn-primary {+ background-color: var(--tertiary);+ color: var(--secondary);+ display: inline-block;++ @include viewport.until(sm) {+ order: 1;+ margin-left: 0;+ }+ }++ &:hover,+ &:focus {+ background-color: var(--tertiary-hover);+ }++ &primary:active {+ background-color: var(--tertiary-high);+ }++ &:disabled {+ background-color: var(--tertiary-low);+ }+ }}diff --git a/app/views/finish_installation/confirm_email.html.erb b/app/views/finish_installation/confirm_email.html.erbindex 5c8638e91cf..40e16fa198f 100644--- a/app/views/finish_installation/confirm_email.html.erb+++ b/app/views/finish_installation/confirm_email.html.erb@@ -3,7 +3,7 @@<%= raw(t 'finish_installation.confirm_email.message', email: @email) %><div class='row'>- <%= button_to(finish_installation_resend_email_path, method: :put, class: 'wizard-container__button primary') do %>+ <%= button_to(finish_installation_resend_email_path, method: :put, class: 'wizard-container__button btn-primary') do %><%= t 'finish_installation.resend_email.title' %><% end %></div>diff --git a/app/views/finish_installation/index.html.erb b/app/views/finish_installation/index.html.erbindex c1e979e7387..66b4add393a 100644--- a/app/views/finish_installation/index.html.erb+++ b/app/views/finish_installation/index.html.erb@@ -3,7 +3,7 @@<h1><%= t 'finish_installation.congratulations' %></h1><p><%= t 'finish_installation.register.help' %></p>- <%= link_to(finish_installation_register_path, class: 'wizard-container__button primary') do %>+ <%= link_to(finish_installation_register_path, class: 'wizard-container__button btn-primary finish-installation__register') do %><svg xmlns="http://www.w3.org/2000/svg" width="14px" height="14px" viewBox="0 0 448 512"><path fill="currentColor" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"></path></svg>diff --git a/app/views/finish_installation/register.html.erb b/app/views/finish_installation/register.html.erbindex ddfe6d698af..f48ab403dd0 100644--- a/app/views/finish_installation/register.html.erb+++ b/app/views/finish_installation/register.html.erb@@ -45,7 +45,7 @@<% end %></div>- <%= submit_tag(t('finish_installation.register.button'), class: 'wizard-container__button primary') %>+ <%= submit_tag(t('finish_installation.register.button'), class: 'wizard-container__button btn-primary') %><%- end %><%- else -%>diff --git a/spec/system/finish_installation_spec.rb b/spec/system/finish_installation_spec.rbnew file mode 100644index 00000000000..fa3acf002be--- /dev/null+++ b/spec/system/finish_installation_spec.rb@@ -0,0 +1,20 @@+# frozen_string_literal: true++RSpec.describe "Finish Installation", type: :system do+ before do+ SiteSetting.has_login_hint = true+ GlobalSetting.stubs(:developer_emails).returns("[email protected]")+ end++ it "renders first screen" do+ visit "/finish-installation"++ find(".finish-installation__register").click++ expect(page).to have_css(".wizard-container__combobox") # email field+ expect(page).to have_css(".input-area")+ expect(page).to have_css(".wizard-container__button") # submit button++ # TODO: add more steps here to ensure full flow works+ end+end