-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🥔✨ Space
: Display domain
on Space#edit
#1600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! to test this you will probably want to add an expectation to the SpacesController#show
tests in spec/requests/spaces_controller_request_spec
or
You could make a Space::WebsiteSettingsComponent
which would be testable outside the request/response cycle (and therefore slightly easier)
@@ -4,6 +4,13 @@ | |||
<p class="text-sm italic"><%= t('website_settings.help_text') %></p> | |||
</header> | |||
|
|||
<h4 class="text-base"> Domain </h4> | |||
<% if space.branded_domain.present? %> | |||
<p class="text-sm"><%= space.branded_domain %></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could put the if
inside the p
to reduce divergence between the branches. Also, space.branded_domain.presence || "No Domain"
will evaluate to "No Domain" when space.branded_domain
is nil
or #empty?
and the value held in space.branded_domain
otherwise.
Which means you could do this!
<p class="text-sm"><%= space.branded_domain.presence || "No Domain"%></p>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed c5b6ce0
Space
config displays branded domainSpace
config displays branded domain
Co-authored-by: Zee Spencer <[email protected]> Co-authored-by: Ana <[email protected]> Co-authored-by: Dalton Pruitt <[email protected]>
<% if space.branded_domain.present? %> | ||
<p class="text-sm"><%= space.branded_domain.presence || "No Domain" %></p> | ||
<% else %> | ||
<p class="text-sm"> No domain </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the if
/else
anymore?
Space
config displays branded domainSpace
: Display domain
on Space#edit
Space
: Display domain
on Space#edit
Space
: Display domain
on Space#edit
Space
Domain #1513TODO
unit test when space.branded_domain=nil (redirect issue prevents us from creating unit test for when domain is set 🥔✨Space
:Member
may setDomain
#1595)Domain exists
Domain is nil