Skip to content

Instantly share code, notes, and snippets.

@rahilhastu
Last active February 2, 2024 08:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahilhastu/7e1b6d851f5960d8c54a222fada9cd0e to your computer and use it in GitHub Desktop.
Save rahilhastu/7e1b6d851f5960d8c54a222fada9cd0e to your computer and use it in GitHub Desktop.
Google Summer of Code - Plone Foundation - 2023

Screenshot 2023-08-19 at 8 04 04 PM

Final Report for Google Summer of Code Program

Screenshot 2023-08-19 at 8 05 03 PM

Student : Rahil Hastu

Mentors : Rob Gietema, Jakob Kahl

Project : User Management in Plone

Google Summer of Code URL: https://summerofcode.withgoogle.com/programs/2023/projects/gqN2Dzf7

Description : The Plones’ Volto user management system was missing several key features, such as the ability to edit existing users and groups in the frontend. This project aimed to address these shortcomings by implementing robust and responsive UI techniques to improve the user experience and functionality.

To achieve this, the existing user and group management screens were redesigned using React, and new workflows connecting the frontend and backend were developed using Python. Edit functionalities were added across all three screens (User, Group, and User Group Membership), ensuring a smooth user experience and minimizing errors.

In addition to addressing the missing features, this project also aimed to improve the overall appearance and responsiveness of the system. By thoroughly testing all pages and resolving any issues that arose, I ensured that the final product was both visually appealing and highly functional.

Overall, this project represented a significant step forward in Plone's user management capabilities, providing users with a more powerful and streamlined system for managing users and groups.

What work was done

Laying Foundation

In this project, the primary focus revolved around gaining a comprehensive understanding of the Plone architecture and its operational intricacies. This initial phase involved delving into the core functioning of Plone and creating foundational web pages using the platform. As the project progressed, there was a noticeable influx of queries pertaining to the setup process for Plone's development environment. To address these inquiries comprehensively, I authored a comprehensive blog post that offers a step-by-step guide for setting up Plone for development. The blog post, titled "Installing Plone Volto using buildout — For Development," serves as a resourceful guide for individuals seeking to establish a development environment with Plone.

User Management

With a solid grasp of the Plone architecture, attention shifted to the implementation of specific modules. The initial module selected for development was the "User Management" module. This module presented an array of new features to be integrated into the user interface. Implementing these features necessitated the creation of new functions, each accompanied by corresponding JSX files that facilitated the execution of these functions and the rendering of associated HTML components. Collaborative discussions with my mentor resulted in a clear project plan, much of which aligned with the strategies outlined in the project proposal.

Key functionalities were successfully integrated into the system during this phase:

  • Edit Functionality: This feature facilitates the display of the user editing model.
  • Edit User Submit Functionality: The "editUserSubmit" function captures and processes user modifications through API calls.
  • User Group Management: The "addUserToGroup" function allows the addition of users to specific groups.
  • Error Handling: The "onEditUserError" function manages scenarios where the API returns errors.

Screenshot 2023-08-19 at 1 51 10 PM

Edit Modal user screen

In addition to introducing these functions, existing functionalities were refined to ensure increased robustness and streamlined performance. By minimizing potential error scenarios and optimizing the page structure for enhanced performance, the overall user experience was significantly improved. This phase of the project successfully laid the groundwork for a more advanced and user-friendly Plone system.

Pull Request

Changes related to User Screen

Groups Management

Within the scope of group management, the project involved enhancing the existing functionalities to enable a more versatile user experience. The initial state of affairs allowed users to create new groups. However, to enhance usability, the project aimed to empower authorized users with the ability to edit existing groups and seamlessly add users to these groups, all from within the same interface. This streamlined approach was designed to simplify the group management process.

Group Membership Screen

The implementation of these new features required a systematic approach. To facilitate the addition of users to groups, the project leveraged Redux state management to retrieve a comprehensive list of users. This list was then filtered to present only those users who were not already associated with the selected group, thus preventing redundancy and enhancing user convenience.

Add users Groups Screen

The resulting system now boasts several key functionalities that enhance its utility:

  • editGroup: This feature triggers the display of an editing modal, allowing authorized users to modify group details.
  • onEditGroupSubmit: The corresponding functionality manages the submission of edited group information, ensuring data accuracy.
  • addUserToGroup: By intelligently filtering users based on the selected group and those already part of it, this function simplifies the user addition process.
  • onAddUsersGroupSubmit: This functionality takes care of the essential API call to the backend, seamlessly adding users to the specified group.

Edit Group Groups Screen

Throughout the development phase, special attention was devoted to error handling and usability enhancements. Notably, potential errors caused by spaces in group names were addressed through meticulous validation checks. Additionally, to maintain data integrity, the decision was made to restrict the editing of group names once they are created, ensuring consistency within the system.

Pull Request

Changes related to Group Screen

User Group Membership Screen

The undertaken tasks revolved around refining the user interface of the User and Group Membership screen to achieve a consistent and unified visual experience, akin to other settings pages. Throughout the development process, efforts were concentrated on addressing issues that arose, ensuring seamless functionality.

One critical issue that was resolved pertained to the stability of the User and Group Membership screen. A specific scenario causing crashes was identified – when users attempted to search for group names containing spaces. Rigorous debugging and meticulous implementation of corrective measures effectively eliminated this concern.

In parallel, substantial optimization efforts were applied to the JSX codebase of the User and Group Membership screen. By judiciously identifying and eliminating redundant classes that no longer contributed meaningfully to functionality, a discernible reduction in the bundle size was achieved. This optimization significantly contributed to improved user experience, manifesting in faster page loading times and overall smoother performance.

A strategic decision was made to incorporate the React Table component for rendering the User and Group Membership pages. This strategic choice played an instrumental role in ensuring efficient and effective page rendering. Notably, the adopted design approach harmonized the visual aesthetics of these pages with existing components, bolstering visual coherence throughout the application.

To summarize, efforts were done to elevate the visual aesthetics and functionality of the User and Group Membership screen. By diligently addressing critical issues, optimizing the codebase, and integrating efficient rendering components, the screen achieved not only a more uniform design but also improved the overall performance of the application.

Old Design

Screenshot 2023-08-19 at 6 02 22 PM

New Design

Screenshot 2023-08-19 at 7 12 53 PM

Pull Request

Changes related to User Group Membership Screen - Search Fields

Changes related to User Group Membership Screen - Matrix showing User and group membership

Testing Efforts

The testing phase encompassed a comprehensive evaluation of the User and Group Membership screen to ensure the integrity of existing functionalities and validate the newly introduced features. This process was meticulously conducted utilizing the Cypress testing framework, which facilitated robust and systematic testing procedures.

A pivotal aspect of the testing endeavor was to verify the seamless functioning of pre-existing functionalities. Through a series of rigorous test cases, the established features were assessed to confirm their consistent performance.

Moreover, the testing scope extended to encompass newly integrated functionalities. Specifically, a suite of new test cases was meticulously formulated to rigorously evaluate the efficacy of these additions. This approach ensured that the new features, empowering users with enhanced editing capabilities and simplified group management, were rigorously tested to guarantee their reliability.

Furthermore, special attention was accorded to internationalization aspects. To facilitate seamless compatibility with diverse languages, all newly introduced strings were integrated with the i18n (internationalization) library. This strategic move ensured that the application's textual content remained adaptable to various languages, promoting a user-friendly experience across different locales.

In conclusion, the testing phase was characterized by a dual focus – on one hand, it rigorously examined pre-existing functionalities, and on the other, it comprehensively evaluated the effectiveness of newly incorporated features. This holistic approach, coupled with meticulous internationalization considerations, culminated in a robust and reliable User and Group Membership screen that delivers consistent performance and user experience.

Pull Request

Test for Groups Page

Test for User Page

Test for User Group Membership Page

Acknowledgement

I extend my heartfelt gratitude to my esteemed mentor, Rob Gietema, and Jakob Kahl, for their unwavering guidance and steadfast support throughout the duration of this Google Summer of Code (GSoC) program. Their invaluable assistance has been instrumental in steering this project towards success. Whenever I encountered challenges, they were readily available to provide expert insights and practical solutions. The seamless coordination and consistent support were facilitated by our weekly meetings, which proved to be a remarkable platform for updates and discussions.

I am profoundly appreciative of their belief in my work and their continuous encouragement to pursue my creative vision. Their mentorship has not only enriched my technical skills but has also fostered an environment of learning and growth.

I am truly fortunate to have had the privilege of working under their guidance, and I look forward to carrying forward the knowledge and experience gained through this exceptional mentorship into my future endeavors.

Thankyou so much :)

@Huzaif-Ahmed
Copy link

Hello Rahil,

I hope this message finds you well! I wanted to express how impressed I am with your code and proposal for the project. Your work has truly left a lasting impression on me, and I admire the way you skillfully handled the issues at hand. Your dedication and expertise are evident, and it's clear that you have a deep understanding of the project's intricacies.

I am planning to participate in Google Summer of Code (GSoC) 2024, and I couldn't think of a better advisor than someone with your level of experience and talent. Your guidance and advice would be invaluable to me as I embark on this exciting journey.

I would greatly appreciate the opportunity to connect with you and discuss this project further. Your insights and wisdom would undoubtedly help me make a strong contribution to the organization during GSoC 2024. Please let me know when it would be convenient for you to chat, and I'll eagerly await your response.

@rahilhastu
Copy link
Author

Thank you so much for your generous compliments and the excitement you've expressed about my contributions to the project. I'm truly pleased to learn of your interest in joining Google Summer of Code (GSoC) for the 2024 season. I'd be thrilled to serve as your mentor and provide valuable guidance throughout your journey.

We have the option to connect on LinkedIn or any other social media platform that both of us feel at ease using.

@Huzaif-Ahmed
Copy link

Thank you so much for your kind response and your willingness to be my mentor for GSoC 2024. I'm truly honored and excited about this opportunity to learn and contribute to the project under your guidance.

I'd be more than happy to connect with you on LinkedIn or any other platform that you prefer. Please let me know which platform works best for you, and I'll make sure to reach out. I'm looking forward to the journey ahead and to learning from your expertise.

@khalidkhankakar
Copy link

Hi @rahilhastu
Now it's time to contirbute in GSoC 2024. I want contribute in this project as Frontend web developer with advance knowlege of react js. Tell me tips and tricks about contribute and also suggest other organization to contirbute in project for practice because GSoC 2024 is comming..

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