Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove _view suffix from views #173

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 49 additions & 49 deletions app/controllers/docs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,200 +5,200 @@ class DocsController < ApplicationController

# GETTING STARTED
def introduction
render Views::Docs::GettingStarted::IntroductionView.new
render Views::Docs::GettingStarted::Introduction.new
end

def installation
render Views::Docs::GettingStarted::InstallationView.new
render Views::Docs::GettingStarted::Installation.new
end

def theming
render Views::Docs::GettingStarted::ThemingView.new
render Views::Docs::GettingStarted::Theming.new
end

def dark_mode
render Views::Docs::GettingStarted::DarkModeView.new
render Views::Docs::GettingStarted::DarkMode.new
end

def customizing_components
render Views::Docs::GettingStarted::CustomizingComponentsView.new
render Views::Docs::GettingStarted::CustomizingComponents.new
end

# INSTALLATION
def installation_rails_bundler
render Views::Docs::Installation::RailsBundlerView.new
render Views::Docs::Installation::RailsBundler.new
end

def installation_rails_importmaps
render Views::Docs::Installation::RailsImportmapsView.new
render Views::Docs::Installation::RailsImportmaps.new
end

# COMPONENTS
def accordion
render Views::Docs::AccordionView.new
render Views::Docs::Accordion.new
end

def alert_component # alert is a reserved word
render Views::Docs::AlertView.new
render Views::Docs::Alert.new
end

def alert_dialog
render Views::Docs::AlertDialogView.new
render Views::Docs::AlertDialog.new
end

def aspect_ratio
render Views::Docs::AspectRatioView.new
render Views::Docs::AspectRatio.new
end

def avatar
render Views::Docs::AvatarView.new
render Views::Docs::Avatar.new
end

def badge
render Views::Docs::BadgeView.new
render Views::Docs::Badge.new
end

def breadcrumb
render Views::Docs::BreadcrumbView.new
render Views::Docs::Breadcrumb.new
end

def button
render Views::Docs::ButtonView.new
render Views::Docs::Button.new
end

def card
render Views::Docs::CardView.new
render Views::Docs::Card.new
end

def calendar
render Views::Docs::CalendarView.new
render Views::Docs::Calendar.new
end

def chart
render Views::Docs::ChartView.new
render Views::Docs::Chart.new
end

def checkbox
render Views::Docs::CheckboxView.new
render Views::Docs::Checkbox.new
end

def checkbox_group
render Views::Docs::CheckboxGroupView.new
render Views::Docs::CheckboxGroup.new
end

def clipboard
render Views::Docs::ClipboardView.new
render Views::Docs::Clipboard.new
end

def codeblock
render Views::Docs::CodeblockView.new
render Views::Docs::Codeblock.new
end

def collapsible
render Views::Docs::CollapsibleView.new
render Views::Docs::Collapsible.new
end

def combobox
render Views::Docs::ComboboxView.new
render Views::Docs::Combobox.new
end

def command
render Views::Docs::CommandView.new
render Views::Docs::Command.new
end

def context_menu
render Views::Docs::ContextMenuView.new
render Views::Docs::ContextMenu.new
end

def date_picker
render Views::Docs::DatePickerView.new
render Views::Docs::DatePicker.new
end

def dialog
render Views::Docs::DialogView.new
render Views::Docs::Dialog.new
end

def dropdown_menu
render Views::Docs::DropdownMenuView.new
render Views::Docs::DropdownMenu.new
end

def form
render Views::Docs::FormView.new
render Views::Docs::Form.new
end

def hover_card
render Views::Docs::HoverCardView.new
render Views::Docs::HoverCard.new
end

def input
render Views::Docs::InputView.new
render Views::Docs::Input.new
end

def link
render Views::Docs::LinkView.new
render Views::Docs::Link.new
end

def masked_input
render Views::Docs::MaskedInputView.new
render Views::Docs::MaskedInput.new
end

def pagination
render Views::Docs::PaginationView.new
render Views::Docs::Pagination.new
end

def popover
render Views::Docs::PopoverView.new
render Views::Docs::Popover.new
end

def progress
render Views::Docs::ProgressView.new
render Views::Docs::Progress.new
end

def radio_button
render Views::Docs::RadioButtonView.new
render Views::Docs::RadioButton.new
end

def select
render Views::Docs::SelectView.new
render Views::Docs::Select.new
end

def sheet
render Views::Docs::SheetView.new
render Views::Docs::Sheet.new
end

def shortcut_key
render Views::Docs::ShortcutKeyView.new
render Views::Docs::ShortcutKey.new
end

def skeleton
render Views::Docs::SkeletonView.new
render Views::Docs::Skeleton.new
end

def switch
render Views::Docs::SwitchView.new
render Views::Docs::Switch.new
end

def table
render Views::Docs::TableView.new
render Views::Docs::Table.new
end

def tabs
render Views::Docs::TabsView.new
render Views::Docs::Tabs.new
end

def textarea
render Views::Docs::TextareaView.new
render Views::Docs::Textarea.new
end

def theme_toggle
render Views::Docs::ThemeToggleView.new
render Views::Docs::ThemeToggle.new
end

def tooltip
render Views::Docs::TooltipView.new
render Views::Docs::Tooltip.new
end

def typography
render Views::Docs::TypographyView.new
render Views::Docs::Typography.new
end
end
4 changes: 2 additions & 2 deletions app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class ErrorsController < ApplicationController
layout -> { ErrorsLayout }

def not_found
render Views::Errors::NotFoundView.new, status: :not_found
render Views::Errors::NotFound.new, status: :not_found
end

def internal_server_error
render Views::Errors::InternalServerErrorView.new, status: :internal_server_error
render Views::Errors::InternalServerError.new, status: :internal_server_error
end
end
2 changes: 1 addition & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class PagesController < ApplicationController
layout -> { PagesLayout }

def home
render Views::Pages::HomeView.new
render Views::Pages::Home.new
end
end
2 changes: 1 addition & 1 deletion app/controllers/themes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ class ThemesController < ApplicationController

# GET /themes/:theme
def show
render Views::Themes::ShowView.new(theme: params[:theme])
render Views::Themes::Show.new(theme: params[:theme])
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::AccordionView < Views::Base
class Views::Docs::Accordion < Views::Base
def view_template
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
component = "Accordion"
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/alert_view.rb → app/views/docs/alert.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::AlertView < Views::Base
class Views::Docs::Alert < Views::Base
def view_template
component = "Alert"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::AlertDialogView < Views::Base
class Views::Docs::AlertDialog < Views::Base
def view_template
component = "AlertDialog"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::AspectRatioView < Views::Base
class Views::Docs::AspectRatio < Views::Base
def view_template
component = "AspectRatio"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/avatar_view.rb → app/views/docs/avatar.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::AvatarView < Views::Base
class Views::Docs::Avatar < Views::Base
def view_template
component = "Avatar"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/badge_view.rb → app/views/docs/badge.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::BadgeView < Views::Base
class Views::Docs::Badge < Views::Base
def view_template
component = "Badge"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::BreadcrumbView < Views::Base
class Views::Docs::Breadcrumb < Views::Base
def view_template
component = "Breadcrumb"

Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/button_view.rb → app/views/docs/button.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::ButtonView < Views::Base
class Views::Docs::Button < Views::Base
def view_template
component = "Button"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::CalendarView < Views::Base
class Views::Docs::Calendar < Views::Base
def view_template
component = "Calendar"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/card_view.rb → app/views/docs/card.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::CardView < Views::Base
class Views::Docs::Card < Views::Base
def view_template
component = "Card"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/chart_view.rb → app/views/docs/chart.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::ChartView < Views::Base
class Views::Docs::Chart < Views::Base
def view_template
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
render Docs::Header.new(title: "Chart", description: "Displays information in a visual way.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::CheckboxView < Views::Base
class Views::Docs::Checkbox < Views::Base
def view_template
component = "Checkbox"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::CheckboxGroupView < Views::Base
class Views::Docs::CheckboxGroup < Views::Base
def view_template
component = "Checkbox"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::ClipboardView < Views::Base
class Views::Docs::Clipboard < Views::Base
def view_template
component = "Clipboard"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Views::Docs::CodeblockView < Views::Base
class Views::Docs::Codeblock < Views::Base
def view_template
component = "Codeblock"
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
Expand Down
Loading