Skip to content

Conversation

@jacneeley
Copy link

@jacneeley jacneeley commented Aug 17, 2025

Issue #2 Overview:

  • added a media query for tablets and phones
  • removed some hardcoded styles and replaced them with more robust css in styles.css
  • fixed invoice preview overflow
  • misc changes :3

Detailed

Accessibility Stuff

I changed the background color slightly because the original colors were very similar and it was hurting my eyes ngl. Just let me know if you want it reverted back to the original.

I tested the following devices using firefox responsive tools:
Screenshot from 2025-08-17 10-29-52

iphone 12/13 mini is really great for testing because they are very small.

Fixing Overflows

The main changes were fixing the overflows with all of the tables. Tables are notoriously painful to make responsive because they don't really respond well to width styling and what not. Their width is primarily determined by the column widths, so the best course of action is to find a responsive way to style th's, tr's and td's. A lot of devs will cheat and build tables using grid-layouts and flex-boxes. I didn't want to do that and change a ton of html. I feel my solution is a good compromise. Check out this StackOverflow thread for more on this.

Media Queries

I opted to just create one media query for mobile and tablets. There was a lot of ugly wrapping when I tried to write styles that would maintain the flex row direction of the forms for tablets. I felt it was simpler to just keep the flex-direction as column if the width of the screen is <= 1024. Anything larger than that is entering desktop territory or 16:9 width. I just could not get it to look the way I wanted when testing for iPad Pro. Maybe somebody better than me could tackle that. Idk I am also lazy and feel its easier to maintain if tablets follow the same rules as phones.

Responsive Samples

Mobile

Screenshot from 2025-08-17 15-15-32 Screenshot from 2025-08-17 15-15-10 Screenshot from 2025-08-17 15-15-53 Screenshot from 2025-08-17 15-15-45

Tablet (iPad)

Screenshot from 2025-08-17 15-16-26 Screenshot from 2025-08-17 15-16-33

Summary by CodeRabbit

  • New Features

    • Mobile-friendly invoice UI with responsive reflow up to 1024px: stacked forms, improved readability, and horizontal scrolling for wide tables.
    • Improved hero heading responsiveness on small screens.
  • Style

    • Updated theme colors for body and navbar to a softer gray.
    • Refined invoice layout and spacing: adjusted margins, alignments, and padding for number/date fields.
    • Wrapped Download PDF button in a dedicated container for better alignment.
    • Removed inline styles from invoice labels for consistency.
    • Added safeguards for form fields (full-width textarea, spacing for disabled inputs).

added a media query for tablets and phones
removed some hardcoded styles and replaced them with more robust css in styles.css
fixed invoice preview overflow
& misc changes :3
@vercel
Copy link

vercel bot commented Aug 17, 2025

@jacneeley is attempting to deploy a commit to the Eshita's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Walkthrough

CSS and HTML updates adjust theming and make the invoice UI responsive. home.css tweaks background colors and adds a mobile hero heading size. invoice.html restructures labels and wraps the download button. style.css adds extensive responsive rules, spacing, and alignment changes for invoice forms and previews.

Changes

Cohort / File(s) Summary
Home theme tweaks
home.css
Changed body/navbar background colors to #f2f2f2; added media query to reduce .hero h1 font size at max-width 768px.
Invoice UI structure
invoice.html
Removed inline font-size styles on invoiceNumber/invoiceDate labels; inserted line breaks after invoiceNumber labels; wrapped Download PDF button in a new div.download-pdf-btn (two occurrences each).
Invoice responsive and styling
style.css
Introduced mobile/1024px reflow converting table layouts to block, adjusted margins/padding/alignment, added .download-pdf-btn, textarea/input tweaks, scrolling for items table, and various left/right alignment and spacing updates; preserved desktop behavior.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–60 minutes

Poem

A nibble of CSS, a hop through HTML lanes,
I thump to stack the forms before the mobile rains.
Buttons snug in burrows, numbers aligned just so—
On smaller fields we scamper, responsive as we go.
With softer hues we wander—ears up, ship it, let’s go! 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jacneeley jacneeley marked this pull request as ready for review August 17, 2025 20:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (2)
home.css (1)

30-30: Fix invalid CSS value with stray space: 20 px20px

The space between the number and unit makes the declaration invalid; the margin-left is currently not applied.

Apply this diff:

-  margin-left: 20 px;
+  margin-left: 20px;
style.css (1)

118-118: Fix invalid color values missing “#” (currently not applied)

These declarations are missing the leading “#”, so they’re ignored by the browser.

Apply this diff:

-  background-color: ffffff;
+  background-color: #ffffff;
@@
-  background-color: ffffff;
+  background-color: #ffffff;
@@
-  background-color: ffffff;
+  background-color: #ffffff;

Also applies to: 145-145, 149-149

🧹 Nitpick comments (7)
home.css (1)

97-101: Consider fluid type for mobile hero heading

4rem may still be large on very small screens. A clamp() can scale more smoothly across devices.

Apply this diff:

-  .hero h1{
-    font-size: 4rem;
-  }
+  .hero h1{
+    /* scales between 2.5rem and 4rem based on viewport width */
+    font-size: clamp(2.5rem, 6vw, 4rem);
+  }
style.css (4)

235-237: Leverage the new .download-pdf-btn wrapper for layout

Right now, only max-width is set; adding centering and alignment improves layout on wide screens and works well with the mobile centering you added to #downloadPDF.

Apply this diff:

-.download-pdf-btn{
-  max-width: 1536px;
-}
+.download-pdf-btn{
+  max-width: 1536px;
+  width: 100%;
+  margin: 0 auto;
+  padding: 0 20px;
+  display: flex;
+  justify-content: flex-end;
+}

Optionally, center on small screens by extending your media query:

 @media (max-width: 1024px) {
+  .download-pdf-btn{
+    justify-content: center;
+  }
 }

274-281: Avoid attribute selectors for performance and specificity

Using [style*="text-align: right"] is brittle and slower. If feasible, prefer a semantic class on those cells (e.g., .align-right) that you can override in the media query. If changing HTML isn’t in-scope, keep as-is.

As a future improvement, consider:

/* HTML: add class="align-right" to those TDs */
.form-preview td.align-right { text-align: right; }
@media (max-width: 1024px) {
  .form-preview td.align-right { text-align: left; }
}

283-289: Add focus styles for keyboard accessibility

The hover effect is nice; include a visible focus indicator for keyboard users.

Apply this diff:

 #downloadPDF {
   display: block;
   margin-top: 20px;
   margin-left: auto;
   margin-right: .7rem;
   margin-bottom: 20px;
   padding: 10px 20px;
   font-size: 14px;
   background-color: #A78BFA;
   color: white;
   border: none;
   border-radius: 6px;
   cursor: pointer;
   transition: transform 0.3s ease, background-color 0.3s ease;
 }
+
+#downloadPDF:focus-visible {
+  outline: 3px solid #193497;
+  outline-offset: 2px;
+}

334-445: Responsive reflow is comprehensive; add two small safety tweaks

Overall, the stacked layout, padding, and scroll handling address the overflow issues well. Two suggestions to harden small-screen behavior:

  • Override the global min-width on right-aligned cells in the mobile block to avoid any residual overflow on very narrow devices.
  • Ensure images shrink to fit width without distortion.

Apply this diff inside the media query:

   .form-preview td[style*="text-align: right"] {
-    text-align: left !important;
+    text-align: left !important;
+    min-width: 0; /* avoid unintended horizontal overflow on very narrow screens */
   }
 
   .form-preview img {
-    height: 50px !important;
+    height: 50px !important;
+    max-width: 100%;
+    object-fit: contain;
     margin-bottom: 10px;
   }
invoice.html (2)

376-378: Wrap for Download PDF is correct; pair with CSS to align

The new .download-pdf-btn wrapper is a good hook. Ensure the corresponding CSS centers on mobile and aligns right on wider screens (see suggested style.css diff).

If desired, also add type="button" to be defensive in case this button is ever moved into a form:

-      <button id="downloadPDF">Download PDF</button>
+      <button id="downloadPDF" type="button">Download PDF</button>

279-283: Consider removing inline image height and use CSS class instead

This avoids the need for !important in CSS and keeps presentation out of markup.

Example:

  • HTML:
-  <img src="gilogo.png" alt="GENINVOICE Logo" style="height: 60px" />
+  <img src="gilogo.png" alt="GENINVOICE Logo" class="invoice-logo" />
  • CSS (outside media, and inside media query):
.invoice-logo { height: 60px; }
@media (max-width: 1024px) {
  .invoice-logo { height: 50px; }
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d13f92d and ee43022.

📒 Files selected for processing (3)
  • home.css (3 hunks)
  • invoice.html (2 hunks)
  • style.css (8 hunks)
🔇 Additional comments (6)
home.css (2)

5-5: Theme background color update looks good

The body background update aligns with the new visual direction and complements the invoice page styles.


16-16: Navbar background color aligned with body

Consistent with the updated theme; no issues here.

style.css (3)

106-113: Textarea box-sizing + full width is a solid base

Good call ensuring consistent sizing and preventing manual resize in the form context.


179-190: Add-row button spacing improvement

The added bottom margin improves visual rhythm between the add-row control and subsequent content. Looks good.


267-273: Invoice number/date styling is appropriate

The padding and font-size give these fields consistent presence without inline styles. Good move.

invoice.html (1)

286-297: Inline font-size removals and invoice-number break are good

Moving presentation to CSS and inserting a conditional line break improves responsiveness and maintainability. No issues found.

@jacneeley jacneeley changed the title Responsive Styles Update Enhancement: Responsive Styles Update Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant