opentelemetry.io icon indicating copy to clipboard operation
opentelemetry.io copied to clipboard

✅[outreachy] Registry : Add to favorites #5447

Open mailsg opened this issue 1 year ago • 9 comments

Fixes

  • Fixes #5447 by @svrnm

Description

  • This PR introduces a "Add to Favorites" feature, allowing users to quickly mark registry entries as favorites. Favorites are stored locally in local storage, ensuring persistence across sessions.
    • Implemented a button for adding/removing items from favorites.
    • Favorites are stored in local storage for better user experience.
    • Integrated the functionality using a favorite-btn that updates dynamically.

Technical details

  • Partial for JavaScript: Moved JavaScript functionality to a separate js/addToFavorites.js file, loaded via a partial in the layout for better maintainability and performance.

  • Local Storage Logic: The local storage checks if an item is already marked as a favorite, and updates the button's appearance accordingly. This avoids the need for server-side calls, keeping it fast and client-side focused.

Screenshots

SS1

SS2

SS3

mailsg avatar Oct 21 '24 18:10 mailsg

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: mailsg / name: Sandeep Ghosh (c99bcb56836125896fcb39f8773fb9170f30a4c3, 92cd36cf8e3143e1582a0d337e57e079ff3001f3, a55c92af14195553298d512b311c58c755a1436a, 8017aeac343414051f3798d5ef00508ae5294311, d8b663b995a3a237c8c188295f78efb414a57aac, ff3ad9b19364cb0c97d446dc573b4aedfd7be9e5, 38d39b3fc3c66e223821dfa6108f2df553dba879, 986eba4bc51025b1a4c9fe400bf1457f63c7ea76, 10c1ee49375295ab68f4ee054c2e20c3e8d6f24b)

~~@mailsg: I see that I can add favorites, have you planned any way that I can use the favorites, e.g. only see the favorites or any other way?~~

@mailsg, I don't have a registration from you as a contributor in the outreachy platform. Since I have closed the project, I will close your isse and PR. Thank you for participating in outreachy!

svrnm avatar Oct 22 '24 08:10 svrnm

@mailsg please make sure that you register with the outreachy platform after that I will provide a review

svrnm avatar Oct 22 '24 11:10 svrnm

thanks for registering your contributions in the outreachy platform. Following up with my previous feedback:

I see that I can add favorites, have you planned any way that I can use the favorites, e.g. only see the favorites or any other way?

svrnm avatar Oct 23 '24 07:10 svrnm

thanks for registering your contributions in the outreachy platform. Following up with my previous feedback:

I see that I can add favorites, have you planned any way that I can use the favorites, e.g. only see the favorites or any other way?

Hi @svrnm,

In addition to providing users with the ability to add and remove items from their favorites, there are several practical ways to make this feature more useful. These can be the planned usage of the Add to Favorites feature :

  1. Dedicated "Favorites" Page

    • Users will be able to view all of their favorite marked items in one place by navigating to a dedicated "Favorites" page. This page will aggregate all marked items for easy access.
    • This allows users to quickly locate their preferred resources without having to search through the entire registry each time.
  2. Filter by Favorites

    • An additional filter could be added to the registry that allows users to view only their favorite marked items while browsing the main catalog. This would integrate the favorites functionality directly into the registry interface, making it more user-friendly and efficient for users looking to engage with their curated resources.
  3. Persistence Across Sessions

    • Since the favorites are stored in local storage or session cookies, users can access their list of favorites even after logging out or closing the browser. This ensures that the favorites list persists across sessions, improving the user experience by providing continuity.
  4. Improved Personalization

    • With a user's favorites data available, the site could later introduce personalized content suggestions based on their favorites, such as related tools, newly added components, or relevant updates. This could lead to better user satisfaction and engagement without requiring significant changes to the initial feature implementation.
  5. Future Expansions

    • In the future, favorites could serve as the foundation for more advanced features, such as exporting favorite lists, sharing with others, or receiving notifications when an item in their favorites is updated. These expansions would make the feature even more valuable to users while aligning with the overall goal of improving user experience.

To conclude, the Add to Favorites feature is designed to make the registry more user-friendly and personalized. By giving users a dedicated page for their favorites, a filter to view only their selected items, and ensuring everything is saved across sessions, we are making it easier for users to engage with the platform in a way that works for them. This will not only make the registry more useful on a day-to-day basis, but it also sets the stage for future improvements like personalized recommendations or sharing favorites with others. Overall, I think this can be a step towards making the site more interactive and valuable for the community.

Thanks.

mailsg avatar Oct 23 '24 12:10 mailsg

Please implement "Filter by Favorites". Thanks.

svrnm avatar Oct 23 '24 13:10 svrnm

Please implement "Filter by Favorites". Thanks.

Description

  • The JavaScript functionality enhances user interaction with the registry by allowing users to filter their view to display only their favorite entries. This feature simplifies navigation by letting users focus on items they are most interested in.

Technical details

  • The implementation consists of event listeners that manage user interactions with the Show Favorites button. When a user selects to view only their favorites, the system checks against local storage to display the appropriate items and toggling Show Favorites to Show All.
  • When the user selects Show All, they can view all the registry items.

SS-1

SS-2

Thanks.

mailsg avatar Oct 23 '24 17:10 mailsg

overall lgtm, a few comments

Hi @svrnm,

I have made the suggested changes.

SS-1

Thanks.

mailsg avatar Oct 24 '24 10:10 mailsg

I consider this as done! After the outreachy application phase we will take another look and see if we can merge this PR. Thank you!

svrnm avatar Oct 24 '24 12:10 svrnm

I will close this for now, since I raised a follow up discussion here: https://github.com/open-telemetry/opentelemetry.io/issues/5759

if you are interested in continuing contributing, please take a look! If we agree to build this, you can give it a try!

Thanks

svrnm avatar Dec 11 '24 13:12 svrnm