Skip to content

Conversation

@TechSpiritSS
Copy link

Fixes Issue #6028

This pull request adds a visibility control feature to the SendFeedback component. The visibility of the component is now determined by the isVisible state, which can be set to true or false.

The component's opacity is adjusted based on the isVisible state. When isVisible is true, the component is fully visible with an opacity of 1. When isVisible is false, the component is hidden with an opacity of 0.

This update allows for greater flexibility in controlling the visibility of the SendFeedback component, making it easy to show or hide the component based on specific conditions or user interactions.

Recording.2023-06-12.022241.mp4

@facebook-github-bot
Copy link
Collaborator

Hi @TechSpiritSS!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 11, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 103.16 KB (🟡 +2 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/404 75.41 KB (🟡 +72 B) 178.57 KB
/500 75.4 KB (🟡 +72 B) 178.56 KB
/[[...markdownPath]] 76.82 KB (🟡 +72 B) 179.98 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@TechSpiritSS
Copy link
Author

TechSpiritSS commented Jun 11, 2023

I am a college student who saw this issue and tried to fix it, I have signed that CLA is there something else needed to be done?

<div className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex">
<div
className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex"
style={{opacity: isVisible ? 1 : 0}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

opacity doesn't remove the element. Even with opacity: 0 The DOM node is selectable and accessable. Try to display: none or opacity: 0 with pointer-events: none.

Copy link
Author

Choose a reason for hiding this comment

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

Added

<div className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex">
<div
className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex"
style={{opacity: isVisible ? 1 : 0}}>
Copy link
Contributor

@AhmedBaset AhmedBaset Jun 14, 2023

Choose a reason for hiding this comment

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

It would be nice if it come out with fade transition.
Add transition-opacity tailwind class.

Copy link
Author

Choose a reason for hiding this comment

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

Done with 300ms

@TechSpiritSS
Copy link
Author

Thanks for the review sir, I'll surely fix them

@AhmedBaset
Copy link
Contributor

duplicate of #5863

@TechSpiritSS
Copy link
Author

Sorry, I didn't know about that.

@anaz-millennium
Copy link

This issue still remains there, any update by anyone

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.

4 participants