Skip to content

Refactor/to-scss-reveal-content-container #251

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 3 commits into
base: main
Choose a base branch
from

Conversation

briangesteban
Copy link
Member

Web Dev Path
238

Have you updated the CHANGELOG.md file? If not, please do it.

Yes

What is this change?

  • Migrate RevealContentContainer component from styled-components to SCSS module.

Were there any complications while making this change?

None

How to replicate the issue?

N/A

If necessary, please describe how to test the new feature or fix.

Reload browser or scroll down to check first load transitions.

When should this be merged?

After the reviews.

Image Reference

Not available since it's non-static update. It's the transition from first load.

Copy link

netlify bot commented Jul 9, 2025

Deploy Preview for webdevpathstage ready!

Name Link
🔨 Latest commit 6946089
🔍 Latest deploy log https://app.netlify.com/projects/webdevpathstage/deploys/686fe804e05a7d0008c204cf
😎 Deploy Preview https://deploy-preview-251--webdevpathstage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.


const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({});
const [firstLoad, setFirstLoad] = useState(true);
const [hiddenStyle, setHiddenStyle] = useState(true);
const hiddenStyleClass = hiddenStyle ? styles.sectionHidden : null; // return sectionHidden class name if hiddenStyle is true.
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this comment. It's not necessary to add comments to self-explanatory code as people reading the code are usually also developers

Another issue with this line is if it's set to null, it will has class="null" in the html like so

Image

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @cherylli ! Thanks for the review. I've fix the null set on class name, and remove the unnecessary comment.

@briangesteban briangesteban self-assigned this Jul 10, 2025
@briangesteban briangesteban requested a review from a team July 10, 2025 16:25
Copy link
Member

@shayla-develops-webs shayla-develops-webs left a comment

Choose a reason for hiding this comment

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

Looks great!

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