Skip to content

Initial layout on tutorial page #518

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jathayde
Copy link
Contributor

image

There are some oddities stemming from the font-size: 0; line-height: 0; declaration from ~ 4 years ago (cards.scss:2 & 3). I decided to override them instead of refactoring the entire site.

Some formatting cleanup for legibility from my previous docs page work as well.

@AmandaPerino
Copy link
Collaborator

Made some copy updates! Is there anything we can do about all this white space to the right? It seems awfully crowded to the left and open on the right.

Screenshot 2025-06-27 at 22 20 26

@jathayde
Copy link
Contributor Author

Made some copy updates! Is there anything we can do about all this white space to the right? It seems awfully crowded to the left and open on the right.

Screenshot 2025-06-27 at 22 20 26

Yes. Let me work that to not be 50/50 and just be the content width.

@jathayde
Copy link
Contributor Author

jathayde commented Jul 1, 2025

Updated:
image

@jathayde
Copy link
Contributor Author

Updated full page screenshot from Firefox:
Screenshot 2025-07-15 at 20-01-44 Ruby on Rails Tutorials

@jathayde
Copy link
Contributor Author

The fullwidth card is weird in how it behaves responsively. Could use some pairing on that to make it more robust.

@AmandaPerino
Copy link
Collaborator

Would be nice to close the space a bit between the Beginner and Advanced section. I'll ask around for some help.

@ghiculescu
Copy link
Member

Quick comment from Amanda's call for help - this is a really good use case for an AI agent. For example I put this prompt into Claude Code: "The "fullwidth" card in _pages/tutorial.html isnt working well on narrow screens. Here is a screenshot: [Image #1]. It looks fine on wider screens. What should I do to fix it?" with this screenshot:

image

I needed two cracks at it, once I gave it a screenshot of how it looks on a wider screen it came up with this, which seems to fix things for me:

diff --git a/_sass/modules/_cards.scss b/_sass/modules/_cards.scss
index 8b7e2e1..6e23ab1 100755
--- a/_sass/modules/_cards.scss
+++ b/_sass/modules/_cards.scss
@@ -30,7 +30,7 @@
     z-index: 1;

     &.card__fullwidth {
-      grid-template-columns: minmax(600px, 800px);
+      grid-template-columns: minmax(0, 800px);
       justify-content: center;

       .card {
@@ -46,6 +46,7 @@
             width: 100%;
             margin: 1em;
             height: auto;
+            max-width: 100%;
           }

           h3 {
@@ -227,6 +228,28 @@
     }
   }

+  @media (max-width: 767px) {
+    &__container {
+      &.card__fullwidth {
+        .card__body {
+          flex-direction: column;
+          align-items: center;
+          padding: 1em;
+
+          img {
+            width: 100% !important;
+            max-width: 400px;
+            margin: 0 0 1.5em 0;
+          }
+
+          > div {
+            width: 100%;
+          }
+        }
+      }
+    }
+  }
+

@jathayde
Copy link
Contributor Author

AWesome. Thanks @ghiculescu . That created some downstream problems in the responsive, but fixed a few of those issues, especially on mid-size mobile. I'll keep working on it and pushing Claude to see what i can resolve here.

@jathayde
Copy link
Contributor Author

jathayde commented Jul 21, 2025

Here are the screenshots from Firefox. There's some weird clipping issue where the top container doesn't extend over the bottom 100px or so of the top card area. Have not been able to crack that, but put in a responsive workaround. You can see that even between mobile devices, the bottom padding shifts in weird ways.

responsive_tutorial_20250720a

<div class="cards__container">
<div class="card">
<a
href="https://guides.rubyonrails.org/install_ruby_on_rails.html"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
href="https://guides.rubyonrails.org/install_ruby_on_rails.html"
href="https://guides.rubyonrails.org/sign_up_and_settings.html"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just heard from @fxn that there is a redirect in place where we can use the Guides URL even if the guide only exists on edge.

@jathayde
Copy link
Contributor Author

/docs/tutorial => /docs/tutorials has been implemented per Basecamp discussion.

On the card, I cleared out some of the inherited styles for .card__fullwidth which helps it feel more inline with what it should be, also adjusting the text to feel better on the mobile instance:

screenshot of docs tutorials page with new fullwidth card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants