Skip to content

Commit

Permalink
Chore: Remove smaller lesson content font size feature flag (TheOdinP…
Browse files Browse the repository at this point in the history
…roject#4042)

Because:
* It has been enabled and rolled out to all users.
* Closes: TheOdinProject#4006

This commit:
* Reverts the PR that added the feature flag
  • Loading branch information
KevinMulhern authored and Mclilzee committed Aug 2, 2023
1 parent 62ea42c commit 29d2f54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/components/content_container_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="lesson-content max-w-prose mx-auto prose <%= font_size %> prose-gray prose-a:text-blue-800 visited:prose-a:text-purple-800 prose-code:bg-gray-100 prose-code:p-1 prose-code:font-normal dark:prose-a:text-blue-300 dark:visited:prose-a:text-purple-300 dark:prose-code:bg-gray-700/40 prose-code:rounded-md break-words line-numbers dark:prose-invert dark:antialiased prose-pre:rounded-xl prose-pre:bg-slate-800 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/70 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 <%= classes %>" data-controller="syntax-highlighting diagramming" <%= html_data_attributes_for(data_attributes) %>>
<div class="lesson-content max-w-prose mx-auto prose prose-gray prose-a:text-blue-800 visited:prose-a:text-purple-800 prose-code:bg-gray-100 prose-code:p-1 prose-code:font-normal dark:prose-a:text-blue-300 dark:visited:prose-a:text-purple-300 dark:prose-code:bg-gray-700/40 prose-code:rounded-md break-words line-numbers dark:prose-invert dark:antialiased prose-pre:rounded-xl prose-pre:bg-slate-800 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/70 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 <%= classes %>" data-controller="syntax-highlighting diagramming" <%= html_data_attributes_for(data_attributes) %>>
<%= content %>
</div>
11 changes: 2 additions & 9 deletions app/components/content_container_component.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
class ContentContainerComponent < ApplicationComponent
def initialize(classes: '', data_attributes: {}, current_user: nil)
def initialize(classes: '', data_attributes: {})
@classes = classes
@data_attributes = data_attributes
@current_user = current_user
end

private

attr_reader :classes, :data_attributes, :current_user

def font_size
return '' if current_user && Feature.enabled?(:lesson_content_font_size, current_user)

'md:prose-lg'
end
attr_reader :classes, :data_attributes
end
2 changes: 1 addition & 1 deletion app/views/lessons/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<main class="grid grid-cols-12 gap-x-6" data-controller="lesson-toc" data-lesson-toc-item-classes-value="no-underline hover:text-gray-800 text-sm dark:hover:text-gray-300">
<article class="col-span-full xl:col-span-7 xl:col-start-2">
<%= render ContentContainerComponent.new(classes: 'xl:mx-0', data_attributes: { lesson_toc_target: 'lessonContent' }, current_user:) do %>
<%= render ContentContainerComponent.new(classes: 'xl:mx-0', data_attributes: { lesson_toc_target: 'lessonContent' }) do %>
<%= @lesson.body.html_safe %>
<% end %>
</article>
Expand Down

0 comments on commit 29d2f54

Please sign in to comment.