Skip to content

Commit e06ca83

Browse files
authored
refact: some cleanups and components renames (#253)
* SEO improvements * SEO improvements * plan the tech debt cleanup * optimizations * Shameless green: add .c-responsive-preview-content dual-class at line 3094 * Micro-step: extend .fl-responsive-preview-content input button at line 3098 * Shameless green: add .c-responsive-preview-content submit at line 3102 * Flocking step 1: identify .fl-responsive-preview-content button pattern at line 3106 * Shameless green: add .c-full-width dual-class at line 354 * Flocking step 2: find smallest difference in .fl-photo component at line 534 * Flocking step 3: make smallest change for .c-fixed-width complex selector at line 1904 * CSS Migration Phase 7: Micro-change 1 - Add c-form-field dual-class support - Convert .fl-form-field to dual-class .c-form-field, .fl-form-field - Maintain 100% backward compatibility - Part of systematic FL Builder CSS migration * CSS Migration Phase 7: Micro-change 2 - Add c-form-error dual-class support - Convert input.fl-form-error to dual-class with c-form-error - Extends c-form-field coverage to input error states - Maintains 100% backward compatibility * CSS Migration Phase 8: Micro-change 1 - Add c-widget dual-class support - Convert .fl-widget to dual-class .c-widget, .fl-widget - Enable modern widget component styling - Maintains 100% backward compatibility * CSS Migration Phase 9: Micro-change 1 - Add c-animation dual-class support - Convert .fl-animation to dual-class .c-animation, .fl-animation - Enable modern animation component styling - Maintains 100% backward compatibility * CSS Migration Phase 9: Micro-change 2 - Add c-animated dual-class support - Convert complex animation selectors to include dual-class patterns - Add c-animated class for modern animation states - Maintains 100% backward compatibility * CSS Migration Phase 9: Micro-change 3 - Complete c-animated dual-class support - Convert standalone .fl-animated to dual-class pattern - Complete animation-fill-mode properties dual-class support - Maintains 100% backward compatibility * CSS Migration Phase 9: Micro-change 4 - Convert c-slideshow to dual-class pattern - Add c-slideshow selector alongside fl-slideshow - Include universal child selectors (c-slideshow *, fl-slideshow *) - Maintains box-sizing: content-box for slideshow components - Zero visual impact - maintains backward compatibility * CSS Migration Phase 9: Micro-change 5 - Convert nested slideshow image selector - Add c-slideshow .c-slideshow-image img alongside fl-slideshow .fl-slideshow-image img - Maintains max-width: none !important for slideshow images - Preserves nested selector functionality for both class prefixes - Zero visual impact - maintains backward compatibility * CSS Migration Phase 9: Micro-change 6 - Convert c-slideshow-social to dual-class pattern - Add c-slideshow-social selector alongside fl-slideshow-social - Maintains line-height: 0 !important for social elements - Preserves important styling for social media integration - Zero visual impact - maintains backward compatibility * CSS Migration Phase 9: Micro-change 7 - Complete slideshow social universal selector - Add c-slideshow-social * alongside fl-slideshow-social * - Maintains margin: 0 !important for all child elements - Completes slideshow social element styling migration - Zero visual impact - maintains backward compatibility * CSS Migration Phase 10: Micro-change 1 - Convert fl-col pseudo-elements to dual-class - Add c-col:before, c-col:after alongside fl-col:before, fl-col:after - Maintains clearfix functionality for grid layout system - Preserves display: table and content properties for pseudo-elements - High-frequency class (47 occurrences) - critical grid structure * CSS Migration Phase 10: Micro-change 2 - Complete fl-col clearfix after conversion - Add c-col:after alongside fl-col:after in clearfix rule - Maintains clear: both functionality for grid column structure - Completes dual-class support for fl-col clearfix system - Essential for grid layout float clearing mechanism * CSS Migration Phase 10: Micro-change 3 - Convert fl-row pseudo-elements to dual-class - Add c-row:before, c-row:after alongside fl-row:before, fl-row:after - Maintains clearfix functionality for row layout system - Preserves display: table and content properties for pseudo-elements - High-frequency class (31 occurrences) - critical grid structure * CSS Migration Phase 10: Micro-change 4 - Complete fl-row clearfix after conversion - Add c-row:after alongside fl-row:after in clearfix rule - Maintains clear: both functionality for grid row structure - Completes dual-class support for fl-row clearfix system - Essential for grid layout float clearing mechanism
1 parent 61177c3 commit e06ca83

File tree

24 files changed

+2622
-73
lines changed

24 files changed

+2622
-73
lines changed

content/blog/best-practices-for-optimizing-ruby-on-rails-performance/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ cover_image: https://raw.githubusercontent.com/jetthoughts/jetthoughts.github.io
1919
metatags:
2020
image: cover.jpeg
2121
slug: best-practices-for-optimizing-ruby-on-rails-performance
22+
faqs:
23+
- question: "Why is Rails performance optimization important?"
24+
answer: "Rails performance optimization is crucial for SEO rankings (search engines favor faster websites), better user experience with faster page loads, and cost savings through reduced server resource usage and hosting expenses."
25+
- question: "What are the most effective ways to optimize Rails database performance?"
26+
answer: "Use database indexing, optimize ActiveRecord queries with includes() and joins(), implement query caching, use pagination for large datasets, and consider database-specific optimizations like connection pooling."
27+
- question: "How does caching improve Rails application performance?"
28+
answer: "Caching stores frequently accessed data in memory, reducing database queries and computational overhead. Rails supports various caching strategies including page caching, action caching, fragment caching, and low-level caching with Redis or Memcached."
29+
- question: "What server optimization strategies work best for Rails?"
30+
answer: "Choose appropriate server configurations for your traffic, implement load balancing to distribute requests across multiple servers, use cloud platforms like AWS or Google Cloud for better uptime, and configure web servers like Nginx for static asset serving."
31+
- question: "How can I optimize Rails asset delivery?"
32+
answer: "Minify CSS and JavaScript files, compress images, use CDNs for global asset delivery, implement browser caching headers, and leverage Rails asset pipeline for efficient asset compilation and fingerprinting."
33+
- question: "What background job strategies improve Rails performance?"
34+
answer: "Use Sidekiq or Resque for processing heavy tasks asynchronously, implement job queues for email sending and file processing, and separate CPU-intensive operations from user-facing request-response cycles."
2235
---
2336
![Best practices for optimizing Ruby on Rails performance](file_0.jpeg)
2437

content/blog/deploying-ruby-on-rails-applications-with-kamal-devops-docker/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ cover_image: https://raw.githubusercontent.com/jetthoughts/jetthoughts.github.io
1919
metatags:
2020
image: cover.png
2121
slug: deploying-ruby-on-rails-applications-with-kamal-devops-docker
22+
faqs:
23+
- question: "What is Kamal and why should I use it for Rails deployment?"
24+
answer: "Kamal is the default deployment tool for Rails 8 applications that simplifies the process of deploying Rails applications to any VPS. It uses Docker containers and provides a cost-effective alternative to platforms like Heroku while giving you greater flexibility and control over your infrastructure."
25+
- question: "What are the prerequisites for deploying with Kamal?"
26+
answer: "You need a VPS server, Docker installed on the server, a container registry account (like Docker Hub), and a Rails application with the Kamal configuration files (deploy.yml and .env)."
27+
- question: "How do I configure environment variables for Kamal deployment?"
28+
answer: "Environment variables are configured in the .env file for sensitive data like KAMAL_REGISTRY_PASSWORD, RAILS_MASTER_KEY, and POSTGRES_PASSWORD. Non-sensitive variables can be set in the deploy.yml file under the env section."
29+
- question: "What user permissions are needed on the VPS for Kamal?"
30+
answer: "You need to create a deploy user with sudo privileges and Docker group membership. Use commands like 'sudo useradd --create-home -s /bin/bash deploy' and 'sudo usermod -aG docker deploy' to set up the proper permissions."
31+
- question: "How do I set up a database with Kamal?"
32+
answer: "Configure the database as an accessory service in deploy.yml under the accessories section. For PostgreSQL, specify the image, host, port, environment variables, and volume mapping for data persistence."
33+
- question: "What does 'kamal setup' command do?"
34+
answer: "The 'kamal setup' command configures the server and performs the first deployment. It installs necessary dependencies, sets up Docker containers, configures Traefik for load balancing, and deploys your application."
35+
- question: "How do I monitor my deployed application?"
36+
answer: "Use commands like 'kamal details' to see container status, 'kamal app logs' to view application logs, and 'kamal app exec -i bin/rails console' to access the Rails console directly on the server."
2237
---
2338
With the release of Rails 8, [Kamal will be the default tool for deploying Rails applications](https://jetthoughts.com/blog/kamal-integration-in-rails-8-by-default-ruby/), simplifying the process for developers. This change is significant as it standardizes deployment, making it easier for both new and experienced developers to get their applications up and running. Utilizing a VPS for hosting your Rails applications is also a cost-effective alternative to platforms like Heroku, providing greater flexibility and control over your infrastructure.
2439

content/blog/mastering-ruby-on-rails-best-practices-for-efficient-development-in-2024/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ cover_image: https://raw.githubusercontent.com/jetthoughts/jetthoughts.github.io
1919
metatags:
2020
image: cover.jpeg
2121
slug: mastering-ruby-on-rails-best-practices-for-efficient-development-in-2024
22+
faqs:
23+
- question: "What is Ruby on Rails used for?"
24+
answer: "Ruby on Rails is a web application framework that helps developers build websites and web apps quickly and efficiently. It follows the MVC (Model-View-Controller) pattern and emphasizes convention over configuration."
25+
- question: "Why should I follow Rails conventions?"
26+
answer: "Following Rails conventions makes your code more predictable and easier for others to understand. It reduces the need for custom configurations, saving time and effort."
27+
- question: "What are RESTful controllers in Rails?"
28+
answer: "RESTful controllers in Rails organize actions around standard HTTP methods like GET, POST, PUT, and DELETE. This structure makes APIs more intuitive and easier to maintain."
29+
- question: "How can I keep my Rails app secure?"
30+
answer: "To keep your Rails app secure, use built-in security features, regularly update your Rails version and dependencies, and handle user inputs carefully to prevent attacks like SQL injection."
31+
- question: "What are ActiveRecord associations?"
32+
answer: "ActiveRecord associations in Rails define relationships between models, such as one-to-many or many-to-many. They help manage related data efficiently within the database."
33+
- question: "Why is testing important in Rails development?"
34+
answer: "Testing ensures that your Rails application works as expected and helps catch bugs early. It provides confidence when making changes, making your app more reliable and maintainable."
35+
- question: "How do I optimize Rails performance?"
36+
answer: "Rails performance can be optimized through caching strategies, using background jobs for long-running tasks, optimizing database queries with ActiveRecord scopes, and implementing proper view helpers and partials."
2237
---
2338
Ruby on Rails is still one of the go-to frameworks for web development in 2024. It's known for making developers' lives easier with its conventions and a focus on getting things done fast. But to really get the most out of Rails, you gotta stick to some best practices. They help keep your code clean, your apps fast, and your users happy. In this article, we'll break down some key practices you should follow to master Ruby on Rails in 2024.
2439

content/blog/rails-8-introducing-new-default-asset-pipeline-propshaft-ruby/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ cover_image: https://raw.githubusercontent.com/jetthoughts/jetthoughts.github.io
1818
metatags:
1919
image: cover.jpeg
2020
slug: rails-8-introducing-new-default-asset-pipeline-propshaft-ruby
21+
faqs:
22+
- question: "What is Propshaft in Rails 8?"
23+
answer: "Propshaft is the new default asset pipeline in Rails 8, designed to be more lightweight and straightforward than Sprockets. It focuses solely on serving traditional static assets like images, CSS, and non-JavaScript assets, allowing developers to choose their own JavaScript bundling tools."
24+
- question: "How does Propshaft differ from Sprockets?"
25+
answer: "Propshaft is simpler than Sprockets, focusing only on direct file linking and caching for static assets. Unlike Sprockets, it doesn't handle JavaScript bundling, letting developers use modern tools like esbuild or Vite for JavaScript asset management."
26+
- question: "Do I need to migrate from Sprockets to Propshaft?"
27+
answer: "Migration is not mandatory. Rails 8 applications will use Propshaft by default, but existing applications can continue using Sprockets. You can also manually switch between them based on your project's needs."
28+
- question: "What JavaScript bundling tools work with Propshaft?"
29+
answer: "Propshaft works with modern JavaScript bundlers like esbuild, Vite, Webpack, Rollup, and other tools of your choice. Since Propshaft doesn't handle JavaScript compilation, you have the flexibility to use any bundling solution."
30+
- question: "What are the main benefits of using Propshaft?"
31+
answer: "Propshaft offers simplicity with fewer configuration options, better performance for static asset serving, reduced complexity compared to Sprockets, and the freedom to choose modern JavaScript tooling that best fits your application."
32+
- question: "How do I configure Propshaft in my Rails application?"
33+
answer: "Propshaft requires minimal configuration and works out of the box with Rails 8. You can customize asset paths, configure compilers for different file types, and set up caching strategies through simple configuration options."
2134
---
2235

2336
The Rails asset pipeline helps manage static assets like CSS, JavaScript, and images. It improves delivery speed by compressing and combining these files. Sprockets used to be the main tool for this, providing useful features like precompilation and versioning. However, it was often too complicated.

content/services/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Optimize & Empower Products At Any Stage
3-
description: We help optimize products and teams at any stage, from technical strategy to talent acquisition and software development.
3+
description: Transform your technology with expert engineering leadership. Ruby on Rails development, CTO consulting, team scaling. 95% client success rate. Get quote.
44

55
headline: We optimize technology
66
excerpt: From technical strategy and innovation to talent acquisition and software development, we help empower products and teams at any stage.

0 commit comments

Comments
 (0)