Skip to content

fix: missing footer#3253

Merged
gupta-piyush19 merged 1 commit intomainfrom
fix-missing-footer
Oct 2, 2024
Merged

fix: missing footer#3253
gupta-piyush19 merged 1 commit intomainfrom
fix-missing-footer

Conversation

@Dhruwang
Copy link
Member

@Dhruwang Dhruwang commented Oct 2, 2024

What does this PR do?

Fixes #3249

How should this be tested?

Check survey footer on mobile device

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at Formbricks
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues
  • First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it 🙏

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Enhanced layout and visual hierarchy of the LegalFooter component.
  • Bug Fixes

    • Improved alignment and distribution of child elements within the footer.

@vercel
Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
formbricks-cloud ⬜️ Ignored (Inspect) Oct 2, 2024 9:25am
formbricks-docs ⬜️ Ignored (Inspect) Oct 2, 2024 9:25am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

Walkthrough

The LegalFooter component in LegalFooter.tsx has been updated to improve its structure and styling. Key modifications include the addition of a z-index class to the outer <div> and a transition from a block layout to a flex layout for the inner <div>, enhancing the alignment and distribution of child elements. The component's conditional rendering logic remains unchanged, ensuring that it returns null if the specified props are falsy.

Changes

File Change Summary
apps/web/app/s/[surveyId]/components/LegalFooter.tsx Updated JSX structure to include z-index class and changed inner layout to flex for better alignment.

Assessment against linked issues

Objective Addressed Explanation
Ensure footer is visible in mobile view (3249)

Possibly related PRs

  • fix: height & width of survey preview when loading #3234: The changes in the PreviewSurvey component involve layout and styling adjustments, similar to the modifications made to the LegalFooter component's structure and styling, indicating a focus on improving visual presentation in both components.

Suggested labels

bug, good first issue, hacktoberfest, 🕹️ oss.gg, 🕹️ 150 points

Suggested reviewers

  • jobenjada

Poem

🐰 In the footer where we hop,
With links to privacy, we won't stop.
Centered questions, a layout so bright,
On mobile screens, it’s a delightful sight!
Hooray for changes, let’s give a cheer,
For a footer that’s now always near! 🎉


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>, please review it.
    • Generate unit testing code 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 testing code 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 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@github-actions github-actions bot added the bug Something isn't working label Oct 2, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@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 and nitpick comments (2)
apps/web/app/s/[surveyId]/components/LegalFooter.tsx (2)

19-20: Approve changes with a minor suggestion for improved responsiveness

The modifications effectively address the issue of the missing footer in mobile view. The increased z-index ensures visibility, while the flex layout centers the content as expected. These changes align well with the PR objectives and the linked issue requirements.

To further improve responsiveness, consider adding a minimum height to the outer div:

- <div className="absolute bottom-0 z-[1500] h-10 w-full">
+ <div className="absolute bottom-0 z-[1500] h-10 min-h-[2.5rem] w-full">

This ensures the footer maintains a minimum size on smaller screens, improving readability and tap target sizes for mobile users.


Line range hint 1-44: Enhance accessibility for screen readers

While the component functions well, we can improve its accessibility for screen readers. Consider the following enhancements:

  1. Add an aria-label to the footer for better context:
- <div className="absolute bottom-0 z-[1500] h-10 min-h-[2.5rem] w-full">
+ <div className="absolute bottom-0 z-[1500] h-10 min-h-[2.5rem] w-full" aria-label="Legal information">
  1. Add aria-label to links for clearer purpose:
- <Link href={IMPRINT_URL} target="_blank" className="hover:underline">
+ <Link href={IMPRINT_URL} target="_blank" className="hover:underline" aria-label="View Imprint in a new tab">
  Imprint
</Link>

- <Link href={PRIVACY_URL} target="_blank" className="hover:underline">
+ <Link href={PRIVACY_URL} target="_blank" className="hover:underline" aria-label="View Privacy Policy in a new tab">
  Privacy Policy
</Link>

- <Link
-   href={`https://app.formbricks.com/s/clxbivtla014iye2vfrn436xd?surveyUrl=${surveyUrl}`}
-   target="_blank"
-   className="hover:underline">
+ <Link
+   href={`https://app.formbricks.com/s/clxbivtla014iye2vfrn436xd?surveyUrl=${surveyUrl}`}
+   target="_blank"
+   className="hover:underline"
+   aria-label="Report this survey in a new tab">
  Report Survey
</Link>

These changes will improve the user experience for those using screen readers without affecting the visual layout.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 706fa8a and 1d4881d.

📒 Files selected for processing (1)
  • apps/web/app/s/[surveyId]/components/LegalFooter.tsx (1 hunks)
🔇 Additional comments (1)
apps/web/app/s/[surveyId]/components/LegalFooter.tsx (1)

Line range hint 1-44: Summary: Approved with minor suggestions for improvement

The changes effectively address the issue of the missing footer in mobile view, as outlined in the PR objectives and linked issue #3249. The modifications to the layout and z-index ensure that the footer is visible and properly formatted on mobile devices.

To further enhance the component, we've suggested:

  1. Adding a minimum height for improved responsiveness on smaller screens.
  2. Implementing accessibility improvements for screen readers.

These suggestions, if implemented, will further improve the user experience across different devices and for users with varying needs.

Overall, the changes are approved, and the additional suggestions will help create a more robust and inclusive component.

@Dhruwang Dhruwang changed the title fix missing footer fix: missing footer Oct 2, 2024
Copy link
Contributor

@gupta-piyush19 gupta-piyush19 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
Thanks, @Dhruwang 🙌

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] No Footer in Mobile View

2 participants