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

2100 widget info #2238

Closed

Conversation

logical-1985516
Copy link
Contributor

Fixes #2100

Proposed commit message

The ramp widget UI is currently quite empty and more information can be 
added to be more useful.

Let's add date range and footer to the ramp widget so that it is easier 
for people to view the timelime of the commits and the RepoSense 
website.

Other information

This is how the new UI looks:
image

@github-actions github-actions bot requested a deployment to dashboard-2238 July 18, 2024 15:32 Abandoned
@github-actions github-actions bot requested a deployment to docs-2238 July 18, 2024 15:32 Abandoned
@logical-1985516
Copy link
Contributor Author

logical-1985516 commented Jul 18, 2024

How should I go about writing test cases for the widget?

Edit 1: I have noted that the test cases in optimiseTimeLine only pass if the date indicators are not rendered when the trim timeline is unchecked, should I rename the file and add test cases in the same file too?

Edit 2: Should the date indicators still be displayed if there are no commits? Currently, trim timeline does not show the date indicators if there are no commits found.

Edit 3: Some frontend test cases that pass on CI are failing locally - how do I fix this? Furthermore, it takes about 40 minutes to finish running the test cases. One example is:

  1) include merge commits in chart view
       show merge commits in summary chart:
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `[title="[2023-03-03] Merge branch 'new-branch' into cypress: +0 -0 lines "]`, but never found it.     
      at Context.eval (webpack:///./tests/chartView/chartView_mergeCommits.cy.js:5:7)

@github-actions github-actions bot requested a deployment to dashboard-2238 July 27, 2024 12:47 Abandoned
@github-actions github-actions bot requested a deployment to docs-2238 July 27, 2024 12:47 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2238 July 27, 2024 12:48 Abandoned
@github-actions github-actions bot requested a deployment to docs-2238 July 27, 2024 12:48 Abandoned
@logical-1985516 logical-1985516 marked this pull request as ready for review July 27, 2024 13:00
@logical-1985516
Copy link
Contributor Author

Hi @ckcherry23, does this new UI look good to you? Is there any other useful information that could be added to the widget?

@ckcherry23 ckcherry23 self-requested a review August 2, 2024 22:49
Copy link
Member

@ckcherry23 ckcherry23 left a comment

Choose a reason for hiding this comment

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

Hi @logical-1985516, thank you for looking into this! Not sure if you were able to explore the difference between the main report view and the widget mode, but you can read more about the widget mode here [Widget view, Embeddable widgets].

I don't think we should show the date indicators and "Generated by RepoSense" footers for all ramp charts as seen below in the Report view. This is because the since/until dates would be the same for all, and these dates are mentioned at the top of the report, so it is not that meaningful.

Report view:
Screenshot 2024-08-03 at 7 43 37 AM

Widget mode:
Screenshot 2024-01-29 at 8 01 19 PM

Hence, the date range must be visible conditionally, only when widget mode is true. Another option for this is to trim/optimise timelines by default for widgets so that the date range is shown. This would also make the widget ramps easier to differentiate/interpret, so I would prefer this.

For now, I think we can remove the "Generated by RepoSense" attribution footer from the centre of the widget as it seems to be too distracting. We can explore adding a small RepoSense logo at the top/bottom right with a link to the RepoSense website.

@ckcherry23
Copy link
Member

Should the date indicators still be displayed if there are no commits? Currently, trim timeline does not show the date indicators if there are no commits found.

They don't need to be displayed.

Some frontend test cases that pass on CI are failing locally - how do I fix this? Furthermore, it takes about 40 minutes to finish running the test cases. One example is:

  1) include merge commits in chart view
       show merge commits in summary chart:
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `[title="[2023-03-03] Merge branch 'new-branch' into cypress: +0 -0 lines "]`, but never found it.     
      at Context.eval (webpack:///./tests/chartView/chartView_mergeCommits.cy.js:5:7)

The test case you mentioned is a flaky test known to have issues locally on some devices. Might be issues related to author vs commit date. This has always passed on CI, so we can ignore it. Do let us know if there are any other test cases that are failing.

Copy link
Contributor

Hi,
We are going to mark this PR as stale because it has been inactive for the past 30 days.
If no further activity occurs within the following 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 7 days and leave a comment to remove the stale label.
Do let us know if you are stuck so that we can help you!'

@github-actions github-actions bot added the Stale label Sep 14, 2024
Copy link
Contributor

This PR was closed because it has been marked as stale for 7 days with no activity.
Feel free to reopen this PR if you would like to continue working on it.

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.

Add date range and footer to widget
3 participants