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

refactor: improve functionality and accessibility for share and copy components 🪄✨ #1517

Merged
merged 2 commits into from
Aug 11, 2023
Merged

refactor: improve functionality and accessibility for share and copy components 🪄✨ #1517

merged 2 commits into from
Aug 11, 2023

Conversation

0xabdulkhaliq
Copy link
Contributor

@0xabdulkhaliq 0xabdulkhaliq commented Aug 8, 2023

Fixes Issue

Close #1479

Note

This is PR is a retry of #1492

Changes proposed

  • This PR introduces several significant enhancements to the CopyToClipboard.tsx and Share.tsx files, focusing on code refactoring and accessibility improvements. The key changes are as follows:

    • Code Refactoring: Both CopyToClipboard.tsx and Share.tsx components have undergone code refactoring to remove unnecessary elements, such as wrapping divs, and improve code readability and maintainability.

    • Improved Accessibility: The accessibility of the components has been greatly enhanced. We replaced the title attributes with more descriptive and accessible aria-label attributes for the icons. Additionally, we introduced aria-live="polite" to announce changes to screen readers in a polite manner.

    • Styling Enhancement: The inline styles in the components have been removed, and we now rely on CSS classes for styling. This makes the code more organized and easier to manage.

    • Reduced Bloatware: We have trimmed unnecessary elements and styles, resulting in a leaner and more efficient codebase.

    • Icon Change on Success: When the copy action is successful, the copy icon now changes to a checkmark icon (FaCheckSquare). This gives users clear feedback on the success of the copy operation.

    • Resetting Copied Icon: The copied icon now resets back to the original copy icon (FaRegCopy) after 2 seconds, ensuring a smoother user experience.

    • With these improvements, the CopyToClipboard and Share components are now more accessible, efficient, and user-friendly. The PR contributes to the overall enhancement of the repository's codebase and user experience.

@vercel
Copy link

vercel bot commented Aug 8, 2023

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

Name Status Preview Comments Updated (UTC)
linkshub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2023 11:51am

@github-actions github-actions bot added accessibility Code is not up to WCAG standards goal: refactor Refactoring the codebase labels Aug 8, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you, 0xabdulkhalid, for creating this pull request and contributing to LinksHub! 💗

The maintainers will review this Pull Request and provide feedback as soon as possible! 😇
We appreciate your patience and contribution, Keep up the great work! 😀

@0xabdulkhaliq
Copy link
Contributor Author

Hey there Guys 👋🏻

@rupali-codes, @CBID2 & @k-deepak04 Make sure to review this PR, So that we can quickly wrap this up. Otherwise I want to resolve merge conflicts once again.

Thank You!

CBID2
CBID2 previously approved these changes Aug 9, 2023
Copy link
Collaborator

@CBID2 CBID2 left a comment

Choose a reason for hiding this comment

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

LGTM

@CBID2 CBID2 requested a review from k-deepak04 August 10, 2023 01:45
@CBID2 CBID2 added gssoc GirlScript Summer of Code participants status: ready-to-merge Approved & its ready-to-merge level2 Modifying an existing feature labels Aug 10, 2023
Copy link
Contributor

@k-deepak04 k-deepak04 left a comment

Choose a reason for hiding this comment

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

resolve the conflicts

@k-deepak04 k-deepak04 removed the status: ready-to-merge Approved & its ready-to-merge label Aug 10, 2023
@rupali-codes
Copy link
Owner

@0xabdulkhalid can u please resolve conflicts asap?

@0xabdulkhaliq
Copy link
Contributor Author

@rupali-codes Conflicts are resolved!

Please merge this PR now.

Copy link
Collaborator

@CBID2 CBID2 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Owner

@rupali-codes rupali-codes left a comment

Choose a reason for hiding this comment

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

thanks

@rupali-codes rupali-codes merged commit 7da9abd into rupali-codes:main Aug 11, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Code is not up to WCAG standards goal: refactor Refactoring the codebase gssoc GirlScript Summer of Code participants level2 Modifying an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor]: Share and Copy Button Components for Improved Accessibility ⚒️✨
4 participants