Skip to content
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

fix footer not visible on some mobile browsers #36

Merged
merged 3 commits into from
Mar 6, 2024
Merged

fix footer not visible on some mobile browsers #36

merged 3 commits into from
Mar 6, 2024

Conversation

moshetanzer
Copy link
Contributor

@moshetanzer moshetanzer commented Feb 26, 2024

Hi Daniel,

Small fix to keep footer viewable when vh is dynamic. Here are some pics of issue on latest IOS (Safari and Chrome). Wasn't able to test on mobile device but should work - else we can use svh.

IMG_C08015AA9584-1

IMG_91BD38F650EE-1

Summary by CodeRabbit

  • Style
    • Updated the minimum height styling of the main app component for improved display on various devices.
    • Adjusted CSS class in the Vue component template for better layout aesthetics.
    • Added a new class attribute to the template section for enhanced styling effects.
    • Configured 'unocss' rules in Nuxt.js for specific styling requirements.

Copy link

coderabbitai bot commented Feb 26, 2024

Walkthrough

This update focuses on refining the responsiveness and style of a Vue component by adjusting its CSS classes. The key modification involves transitioning from min-h-screen to min-h-dvh, ensuring the component's height adapts fluidly to the viewport.

Changes

File(s) Summary of Changes
app.vue Adjusted CSS class in template: min-h-screen to min-h-dvh.

🐰✨
In the realm of code and Vue,
A small tweak creates a view so new.
From screen to dvh, a subtle transition,
Ensuring layouts with precision.
Here's to changes, modest yet bold,
Elevating apps, as foretold. 🚀✨
🐰💻

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit-tests for this file.
    • 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. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c7a95a0 and adafad2.
Files selected for processing (1)
  • app.vue (1 hunks)
Additional comments: 1
app.vue (1)
  • 130-130: The change from min-h-screen to min-h-dvh in the template section is a targeted fix to address the footer visibility issue on mobile browsers. This approach assumes min-h-dvh is a custom class that better handles the dynamic viewport height (vh) on mobile devices. Ensure that the corresponding CSS for min-h-dvh is defined and correctly implements the intended behavior across different mobile browsers. Testing on actual devices or using browser emulation tools would be beneficial to confirm the effectiveness of this fix.

app.vue Outdated
@@ -127,7 +127,7 @@ else {
</script>

<template>
<div class="md:pl-[5vw] font-sans text-white min-h-screen min-w-screen flex flex-col items-start justify-start">
<div class="md:pl-[5vw] font-sans text-white min-h-dvh min-w-screen flex flex-col items-start justify-start">
Copy link
Owner

Choose a reason for hiding this comment

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

this looks great but do we need to add anything for browsers that don't support dvh, e.g. a fallback? Maybe we could add a custom rule in uno config to add multiple properties including the 100vh fallback?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yip. We should def do that. Though it is quite widely supported now.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between adafad2 and 9acd2d2.
Files selected for processing (2)
  • app.vue (1 hunks)
  • nuxt.config.ts (1 hunks)
Additional comments: 2
nuxt.config.ts (1)
  • 15-18: The addition of the unocss rule for min-h-screen specifies a minimum height of 100vh and assigns it to a _fallback layer. This change seems to align with the PR's objective to address footer visibility issues on mobile browsers by adjusting the minimum height styling. However, it's important to ensure that this rule does not conflict with other CSS rules or negatively impact other components' styling. Additionally, consider documenting the rationale behind using the _fallback layer for future reference and clarity.
app.vue (1)
  • 131-131: The addition of the min-h-dvh class to the div element in the template section is a direct response to the PR's objective of fixing footer visibility issues on some mobile browsers. This change aims to ensure that the footer remains visible across all mobile browsers by adapting to the dynamic nature of the viewport height. It's crucial to verify that this new class (min-h-dvh) is defined elsewhere in the project's CSS with the intended properties to handle the dynamic viewport height effectively. Additionally, testing on actual mobile devices, especially on the mentioned iOS versions of Safari and Chrome, would be beneficial to confirm the effectiveness of this solution.

@danielroe danielroe merged commit eade896 into danielroe:main Mar 6, 2024
4 of 5 checks passed
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9acd2d2 and b58464f.
Files selected for processing (1)
  • app.vue (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app.vue

@danielroe
Copy link
Owner

Thank you!

@moshetanzer moshetanzer deleted the patch-4 branch March 7, 2024 03:14
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.

2 participants