Skip to content

Commit

Permalink
Merge pull request #103 from PhlexUI/ch/update-rails-rename-name-and-…
Browse files Browse the repository at this point in the history
…remove-pro

Update Rails and add RBUI references
  • Loading branch information
cirdes authored Aug 25, 2024
2 parents 9456810 + 3a7c526 commit 9ba22c9
Show file tree
Hide file tree
Showing 32 changed files with 180 additions and 176 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.3.4"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.2.0.beta3"
gem "rails", "7.2.0"
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
gem "propshaft", "0.9.0"
# Use sqlite3 as the database for Active Record
Expand Down
112 changes: 57 additions & 55 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,66 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actioncable (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
activejob (= 7.2.0.beta3)
activerecord (= 7.2.0.beta3)
activestorage (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actionmailbox (7.2.0)
actionpack (= 7.2.0)
activejob (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
mail (>= 2.8.0)
actionmailer (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
actionview (= 7.2.0.beta3)
activejob (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actionmailer (7.2.0)
actionpack (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
activesupport (= 7.2.0)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.0.beta3)
actionview (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actionpack (7.2.0)
actionview (= 7.2.0)
activesupport (= 7.2.0)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
activerecord (= 7.2.0.beta3)
activestorage (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actiontext (7.2.0)
actionpack (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.0.beta3)
activesupport (= 7.2.0.beta3)
actionview (7.2.0)
activesupport (= 7.2.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.0.beta3)
activesupport (= 7.2.0.beta3)
activejob (7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.3.6)
activemodel (7.2.0.beta3)
activesupport (= 7.2.0.beta3)
activerecord (7.2.0.beta3)
activemodel (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
activemodel (7.2.0)
activesupport (= 7.2.0)
activerecord (7.2.0)
activemodel (= 7.2.0)
activesupport (= 7.2.0)
timeout (>= 0.4.0)
activestorage (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
activejob (= 7.2.0.beta3)
activerecord (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
activestorage (7.2.0)
actionpack (= 7.2.0)
activejob (= 7.2.0)
activerecord (= 7.2.0)
activesupport (= 7.2.0)
marcel (~> 1.0)
activesupport (7.2.0.beta3)
activesupport (7.2.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
Expand All @@ -79,6 +79,7 @@ GEM
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
Expand Down Expand Up @@ -212,30 +213,30 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.2.0.beta3)
actioncable (= 7.2.0.beta3)
actionmailbox (= 7.2.0.beta3)
actionmailer (= 7.2.0.beta3)
actionpack (= 7.2.0.beta3)
actiontext (= 7.2.0.beta3)
actionview (= 7.2.0.beta3)
activejob (= 7.2.0.beta3)
activemodel (= 7.2.0.beta3)
activerecord (= 7.2.0.beta3)
activestorage (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
rails (7.2.0)
actioncable (= 7.2.0)
actionmailbox (= 7.2.0)
actionmailer (= 7.2.0)
actionpack (= 7.2.0)
actiontext (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
activemodel (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
bundler (>= 1.15.0)
railties (= 7.2.0.beta3)
railties (= 7.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.2.0.beta3)
actionpack (= 7.2.0.beta3)
activesupport (= 7.2.0.beta3)
railties (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -270,6 +271,7 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
securerandom (0.3.1)
selenium-webdriver (4.23.0)
base64 (~> 0.2)
logger (~> 1.4)
Expand Down Expand Up @@ -351,7 +353,7 @@ DEPENDENCIES
propshaft (= 0.9.0)
pry
puma (= 6.4.2)
rails (~> 7.2.0.beta3)
rails (= 7.2.0)
selenium-webdriver
sqlite3 (>= 1.4)
standard
Expand Down
29 changes: 27 additions & 2 deletions app/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 27 additions & 2 deletions app/assets/images/logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 1 addition & 12 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,9 @@ def welcome

mail(
to: @user.email,
subject: "Welcome to PhlexUI"
subject: "Welcome to RBUI"
) do |format|
format.html { render Mailers::UserMailer::Welcome.new(user: @user) }
end
end

def future_of_phlexui
@user = params[:user]

mail(
to: @user.email,
subject: "Open Source and the Future of PhlexUI (Retry)"
) do |format|
format.html { render Mailers::UserMailer::FutureOfPhlexui.new(user: @user) }
end
end
end
3 changes: 1 addition & 2 deletions app/views/components/docs/header.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# frozen_string_literal: true

class Docs::Header < ApplicationComponent
def initialize(title: nil, description: nil, premium: false)
def initialize(title: nil, description: nil)
@title = title
@description = description
@premium = premium
end

def view_template
Expand Down
3 changes: 1 addition & 2 deletions app/views/components/docs/visual_code_example.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# frozen_string_literal: true

class Docs::VisualCodeExample < ApplicationComponent
def initialize(title: nil, description: nil, context: nil, premium: false)
def initialize(title: nil, description: nil, context: nil)
@title = title
@description = description
@premium = premium
@context = context
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/components/shared/head.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Shared::Head < ApplicationComponent

def view_template
head do
title { "PhlexUI - Component Library" }
title { "RBUI - Component Library" }
meta name: "viewport", content: "width=device-width,initial-scale=1"
meta name: "turbo-refresh-method", content: "morph"
meta name: "turbo-refresh-scroll", content: "preserve"
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/shared/logo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def view_template
TypographyH4(class: "flex items-center") {
img(src: helpers.image_url("logo.svg"), class: "h-4 block dark:hidden")
img(src: helpers.image_url("logo_dark.svg"), class: "h-4 hidden dark:block")
span(class: "sr-only") { "PhlexUI" }
span(class: "sr-only") { "RBUI" }
Badge(variant: :amber, size: :sm, class: "ml-2 whitespace-nowrap") { "Pre Release" }
}
end
Expand Down
1 change: 0 additions & 1 deletion app/views/components/shared/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def components
end

def menu_link(component)
component[:premium] ||= false
current_path = component[:path] == helpers.request.path
a(href: component[:path], class: tokens("group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline", -> { current_path } => "text-foreground font-medium", -> { !current_path } => "text-muted-foreground")) do
span(class: "flex items-center gap-x-1") do
Expand Down
6 changes: 3 additions & 3 deletions app/views/docs/accordion_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def view_template
)
end
end
p(class: "font-medium") { "What is PhlexUI?" }
p(class: "font-medium") { "What is RBUI?" }
end
end
AccordionContent do
p(class: "pl-16 pr-4 pb-4 text-muted-foreground") do
"PhlexUI is a UI component library for Ruby devs who want to build better, faster."
"RBUI is a UI component library for Ruby devs who want to build better, faster."
end
end
end
Expand Down Expand Up @@ -73,7 +73,7 @@ def view_template
AccordionContent do
p(class: "pl-16 pr-4 pb-4 text-muted-foreground") do
"Yes, PhlexUI is pure Ruby and works great with Rails. It's a Ruby gem that you can install into your Rails app."
"Yes, RBUI is pure Ruby and works great with Rails. It's a Ruby gem that you can install into your Rails app."
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/docs/alert_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def view_template
Alert do
rocket_icon
AlertTitle { "Pro tip" }
AlertDescription { "With PhlexUI you'll ship faster." }
AlertDescription { "With RBUI you'll ship faster." }
end
RUBY
end
Expand Down Expand Up @@ -51,7 +51,7 @@ def view_template
Alert(variant: :success) do
check_icon
AlertTitle { "Installation successful" }
AlertDescription { "You're all set to start using PhlexUI in your application." }
AlertDescription { "You're all set to start using RBUI in your application." }
end
RUBY
end
Expand Down
10 changes: 3 additions & 7 deletions app/views/docs/calendar_view.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# frozen_string_literal: true

class Docs::CalendarView < ApplicationView
def initialize
@premium = true
end

def view_template
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
render Docs::Header.new(title: "Calendar", description: "A date field component that allows users to enter and edit date.", premium: @premium)
render Docs::Header.new(title: "Calendar", description: "A date field component that allows users to enter and edit date.")

TypographyH2.new { "Usage" }

render Docs::VisualCodeExample.new(title: "Connect to input", context: self, premium: @premium) do
render Docs::VisualCodeExample.new(title: "Connect to input", context: self) do
<<~RUBY
div(class: 'space-y-4') do
Input(type: 'string', placeholder: "Select a date", class: 'rounded-md border shadow', id: 'date', data_controller: 'input')
Expand All @@ -20,7 +16,7 @@ def view_template
RUBY
end

render Docs::VisualCodeExample.new(title: "Format date", description: "Format dates with date-fns", context: self, premium: @premium) do
render Docs::VisualCodeExample.new(title: "Format date", description: "Format dates with date-fns", context: self) do
<<~RUBY
div(class: 'space-y-4') do
Input(type: 'string', placeholder: "Select a date", class: 'rounded-md border shadow', id: 'formatted-date', data_controller: 'input')
Expand Down
Loading

0 comments on commit 9ba22c9

Please sign in to comment.