Skip to content

[Feature] new UI #83

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

Merged
merged 49 commits into from
Jun 10, 2025
Merged

[Feature] new UI #83

merged 49 commits into from
Jun 10, 2025

Conversation

vedansh-5
Copy link
Contributor

@vedansh-5 vedansh-5 commented Apr 9, 2025

Closes #67
stand alone popup UI

Summary by Sourcery

Redesign the popup UI with a modern layout using Tailwind CSS, add dark mode support, and enhance the scrum report generation and copy functionality. Remove legacy GSoC/CodeHeat logic and refactor scrum data handling for improved flexibility and user experience.

Enhancements:

  • Redesign the popup interface with Tailwind CSS for a modern look and improved usability.
  • Add dark mode support and toggle functionality to the popup UI.
  • Refactor scrum report generation to support both email and popup outputs, including improved error handling and user feedback.
  • Remove GSoC/CodeHeat-specific logic in favor of more flexible date range selection (last week, yesterday, or custom).
  • Improve scrum report copy functionality to output markdown-formatted text.

Build:

  • Add Tailwind CSS, PostCSS, and Autoprefixer to the build system and update related configuration files.

Documentation:

  • Update user-facing documentation in the popup UI to reflect new features and usage.

Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
Copy link
Contributor

sourcery-ai bot commented Apr 9, 2025

Reviewer's Guide

This pull request implements a new standalone popup UI for the Scrum Helper extension, featuring a modern design with Tailwind CSS, improved report generation (including a new 'yesterday' option), enhanced error handling, and a more flexible architecture for generating and copying scrum reports. The build system is updated to support Tailwind CSS, and several legacy UI and logic elements are refactored or removed.

Class Diagram: Script Modifications for New Popup UI

classDiagram
  class scrumHelperJs {
    <<Module>>
    -yesterday: Boolean
    -outputTarget: String
    +allIncluded(outputTarget String) void "Modified: Added outputTarget, yesterday logic. Removed gsoc logic."
    +fetchGithubData() void "Modified: Improved error logging, direct calls to writers"
    +writeGithubIssuesPrs() void "Modified: Clears arrays before processing"
    +writeGithubPrsReviews() void "Modified: Clears arrays, fixed variable name"
    +getYesterday() String "New function"
    +handleYesterdayChange() void "New function"
    +getLastWeek() String "Modified: Removed gsoc dependency"
    +formatDate(dateString String) String
    +getProject() String
    +scrumSubjectLoaded() void "Modified: Removed gsoc logic"
    +window_generateScrumReport() void "New global function for popup integration"

    note for scrumHelperJs "gsoc variable and related logic removed."
  }

  class popupJs {
    <<New Script>>
    -generateReportButton: DOMElement
    -copyReportButton: DOMElement
    -scrumReportDiv: DOMElement
    -darkModeToggle: DOMElement
    +handleGenerateReportClick() void
    +handleCopyReportClick() void
    +toggleRadio(radioElement DOMElement) void
    +initializeEventListeners() void
    +getToday() String
    +getYesterday() String
    +getLastWeek() String
  }

  class mainJs {
    <<Script>>
    -handleGsocClick() void "Removed function"
    -handleCodeheatClick() void "Removed function"
  }

  popupJs ..> scrumHelperJs : calls window_generateScrumReport
  scrumHelperJs ..> mainJs : (indirectly, main.js sets up initial calls/listeners that might use scrumHelper.js, but main.js itself is simplified)
Loading

File-Level Changes

Change Details Files
Introduced a new standalone popup UI with Tailwind CSS and enhanced report generation features.
  • Replaced Materialize CSS with Tailwind CSS for the popup UI.
  • Redesigned popup.html for a modern look and improved UX.
  • Added generate and copy report buttons with new logic.
  • Added dark mode support and toggle.
  • Introduced radio buttons for selecting report timeframe (last week, yesterday, or custom dates).
  • Added a new scrum report display area with editable content.
src/popup.html
src/index.css
src/tailwindcss.css
src/scripts/popup.js
Refactored scrum report generation logic to support popup and email output targets, and added 'yesterday' report option.
  • Refactored allIncluded and related functions to accept an outputTarget parameter ('popup' or 'email').
  • Added logic to handle 'yesterday' as a report timeframe.
  • Improved error handling and logging for GitHub data fetching.
  • Updated report content generation to support both popup and email injection.
  • Removed legacy GSoC/CodeHeat logic and tabs.
src/scripts/scrumHelper.js
Updated build and configuration to support Tailwind CSS and new dependencies.
  • Added Tailwind CSS, autoprefixer, and postcss as dev dependencies.
  • Added @tailwindcss/cli as a dependency.
  • Created tailwind.config.js for Tailwind setup.
  • Updated package.json scripts and dependencies.
  • Added Tailwind CSS output file.
package.json
src/tailwindcss.css
tailwind.config.js
Updated extension manifest and resource handling for new assets and permissions.
  • Added web_accessible_resources for new icons (night mode/light mode).
src/manifest.json
Refactored main.js to remove legacy tab logic and streamline event handling.
  • Removed GSoC/CodeHeat tab logic and related event listeners.
  • Simplified event listeners for input changes.
src/scripts/main.js

Assessment against linked issues

Issue Objective Addressed Explanation

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vedansh-5
Copy link
Contributor Author

This PR has correct fetch logic but lacks some basic and some important tweaks.

Signed-off-by: Vedansh Saini <[email protected]>
@vedansh-5
Copy link
Contributor Author

Fine tuned ui.

Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
@vedansh-5
Copy link
Contributor Author

In these latest changes I have added a toggleRadio function and fixed the enable disable toggle.

Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
@vedansh-5
Copy link
Contributor Author

In the latest changes I fixed the toggleRadio functionality and improved the enable disable toggle.

Signed-off-by: Vedansh Saini <[email protected]>
@vedansh-5
Copy link
Contributor Author

In this commit I have added dark mode and improved visuals.

vedansh-5 added 4 commits May 2, 2025 03:42
Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
@vedansh-5
Copy link
Contributor Author

In the latest commits, I have enhanced the buttons and their behavior, I fixed the bug of standalone report in which the date was not being updated in the generate scrum function, i.e. the report for custom dates was not getting generated.

@vedansh-5
Copy link
Contributor Author

@hongquan I have done a lot in this draft pr, and a lot needs to be done, I'll move onto performance optimization and writing tests, in the meanwhile I'd truly appreciate if you could take a look at this and then maybe we can discuss additional sorting parameters for the data.
Thanks!

@vedansh-5
Copy link
Contributor Author

In the last commit I added a smoother dark mode transition.

@vedansh-5 vedansh-5 marked this pull request as ready for review May 11, 2025 11:46
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @vedansh-5 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@vedansh-5
Copy link
Contributor Author

@mariobehling @hongquan This UI might have some bugs, I am working on finding and fixing them, but I'd need your approval to know whether I'm moving in the right direction or not.

@mariobehling mariobehling requested a review from Preeti9764 May 23, 2025 17:09
Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

Also change replace the last question What is stopping you from doing your work with "What is blocking you from making progress?"

Signed-off-by: Vedansh Saini <[email protected]>
@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

Please make the following changes:

Notes:

  • The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (See this issue)
  • Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing

@vedansh-5 to confirm: based on note 1, someone reviewed a PR 10 days ago, it will still show in his/her last 7 days activity?

Also please unbold the top description.

@vedansh-5
Copy link
Contributor Author

Also please unbold the top description.
sure

@vedansh-5
Copy link
Contributor Author

@vedansh-5 to confirm: based on note 1, someone reviewed a PR 10 days ago, it will still show in his/her last 7 days activity?

Yes, if the pr has been updated it will show in last 7 days

Signed-off-by: Vedansh Saini <[email protected]>
Signed-off-by: Vedansh Saini <[email protected]>
@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

@vedansh-5 When I select the last 1 day, the content/heading questions still show last 7 days

@Preeti9764 please also help to test this, let's aim to release it today

@vedansh-5
Copy link
Contributor Author

@vedansh-5 When I select the last 1 day, the content/heading questions still show last 7 days

@Preeti9764 please also help to test this, let's aim to release it today

Thanks for pointing it out, I am aware of this, I'll fix it and push the code along with working standalone.

@Preeti9764
Copy link
Contributor

Preeti9764 commented Jun 10, 2025

@Preeti9764 please also help to test this, let's aim to release it today

okay ,let me check this out.

@Preeti9764
Copy link
Contributor

Preeti9764 commented Jun 10, 2025

@vedansh-5 When I select the last 1 day, the content/heading questions still show last 7 days

yes, it is showing last week for yesterday , and also there is issue with scrum report generation when i switched to 1 day and then back again to 7 days . I would suggest to look at the functionality of last 7 days button cause it is not working.

@vedansh-5
Copy link
Contributor Author

Fixed the radios. Will now work on the standalone scrum generation. In the meantime @Preeti9764 could you take a look #94 for the new rebase errors. Thanks

@vedansh-5
Copy link
Contributor Author

@hpdang This PR is ready to be merged with all the functionalities, please take a look whenever you can.
@Preeti9764 Please take a look too, lmk if you encounter any issues.
Thanks!

@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

@vedansh-5 very nice! Could you please also change the blocker question and the Notes part?

  • Change "What is stopping you from doing your work?" to "What is blocking you from making progress?" (make it the same for 7 days and 1 day)
  • Change the entire Note section to below:

Notes:

  • The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (See this issue)

  • Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing

@vedansh-5
Copy link
Contributor Author

@vedansh-5 very nice! Could you please also change the blocker question and the Notes part?

  • Change "What is stopping you from doing your work?" to "What is blocking you from making progress?" (make it the same for 7 days and 1 day)
  • Change the entire Note section to below:

Notes:

  • The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (See this issue)
  • Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing

sorry to have missed it, I'll do it right away.

@vedansh-5
Copy link
Contributor Author

@hpdang I have made the requested changes. Please take a look. Thanks

@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

Change "What is stopping you from doing your work?" to "What is blocking you from making progress?"

This should apply in the Email content too. Thank you!

@Preeti9764
Copy link
Contributor

@hpdang This PR is ready to be merged with all the functionalities, please take a look whenever you can. @Preeti9764 Please take a look too, lmk if you encounter any issues. Thanks!

I have tested the new UI and it is all good and ready to be merged . Thanks!

@hpdang
Copy link
Member

hpdang commented Jun 10, 2025

@hpdang This PR is ready to be merged with all the functionalities, please take a look whenever you can. @Preeti9764 Please take a look too, lmk if you encounter any issues. Thanks!

I have tested the new UI and it is all good and ready to be merged . Thanks!

@Preeti9764 did you also test in Yahoo and Outlook? Thanks

@Preeti9764
Copy link
Contributor

@Preeti9764 did you also test in Yahoo and Outlook? Thanks

yes,I tested on all the plateforms

@Preeti9764
Copy link
Contributor

Preeti9764 commented Jun 10, 2025

Change "What is stopping you from doing your work?" to "What is blocking you from making progress?"

This should apply in the Email content too. Thank you!

@hpdang in my case it is showing correct...this is gmail draft.

image

@Preeti9764
Copy link
Contributor

for google groups, yahoo,outlook respectively ..
image
Screenshot 2025-06-10 192245
Screenshot 2025-06-10 192424

@hpdang hpdang merged commit 09f09c5 into fossasia:master Jun 10, 2025
@vedansh-5 vedansh-5 deleted the ui2 branch June 23, 2025 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Refactor pop-up UI
4 participants