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 Projects Dashboard & Fix Last Activity Bug #2606

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Oct 23, 2024

Description

This PR refactors the projects dashboard page by encapsulating the three different components of the page into separate live components. This change makes the page more reusable, improves separation of concerns, and ensures the page itself doesn't handle state and events for these components. Additionally, this PR also fixes a bug identified in the last activity column of the projects list. The bug was due to the last activity column displaying the value of the updated_at column from the projects table. The query has been updated to fetch the most recent updated_at value of the workflows for each project.

Fixes #2593

Validation steps

  1. Log in to the app.
  2. Navigate to the projects dashboard page and confirm that both the welcome section and the projects table load correctly.
  3. Expand/Collapse the welcome section to ensure it functions as expected.
  4. Verify that clicking on the welcome cards loads the associated arcade videos properly.
  5. Test that creating a new project successfully adds it to the projects list.
  6. Confirm that the last activity column now correctly reflects the most recent updated_at date of the workflows for each project.

Additional notes for the reviewer

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 97.22222% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.84%. Comparing base (94b7bfc) to head (e59f551).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ghtning_web/live/dashboard_live/welcome_section.ex 86.95% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2606      +/-   ##
==========================================
+ Coverage   90.79%   90.84%   +0.04%     
==========================================
  Files         318      320       +2     
  Lines       11178    11215      +37     
==========================================
+ Hits        10149    10188      +39     
+ Misses       1029     1027       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elias-ba elias-ba changed the title Integrate Arcade Videos to Welcome Section Unload Arcade Videos When Modal Is Closed Oct 23, 2024
@elias-ba elias-ba changed the title Unload Arcade Videos When Modal Is Closed Refactor Projects Dashboard Page To Use Live Components Oct 23, 2024
@elias-ba elias-ba requested a review from jyeshe October 24, 2024 09:28
@elias-ba elias-ba force-pushed the integrate-arcade-videos branch from 2ec29c8 to 679aa9f Compare October 24, 2024 09:32
Copy link
Member

@jyeshe jyeshe left a comment

Choose a reason for hiding this comment

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

Great component building! 💯

@elias-ba elias-ba removed the request for review from christad92 October 24, 2024 12:54
@elias-ba elias-ba changed the title Refactor Projects Dashboard Page To Use Live Components Refactor Projects Dashboard and Fix Last Activity Column Bug Oct 25, 2024
@elias-ba elias-ba changed the title Refactor Projects Dashboard and Fix Last Activity Column Bug Polish Projects Dashboard Page Oct 25, 2024
@elias-ba elias-ba changed the title Polish Projects Dashboard Page Refactor Projects Dashboard & Fix Last Activity Bug Oct 25, 2024
@stuartc stuartc merged commit 3fa40f9 into main Oct 25, 2024
8 checks passed
@stuartc stuartc deleted the integrate-arcade-videos branch October 25, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

LastActivity Date on projects list is incorrect
3 participants