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

feat!: Rework announcement integration #2181

Merged
merged 1 commit into from
Feb 14, 2025
Merged

feat!: Rework announcement integration #2181

merged 1 commit into from
Feb 14, 2025

Conversation

zusorio
Copy link
Member

@zusorio zusorio commented Feb 7, 2025

This PR does a couple of different things

  • Pick one clear name for notices/alerts/announcements and use it everywhere in code, ui, and documentation
  • Add an option for admins to make an announcement dismissible (stored in localStorage)
  • Add endpoints to make announcements editable
  • Animate announcements in and out using Angular's built-in animation system
  • Make the standard "Welcome to CCM" banner an announcement which can be dismissed
  • Rework the admin page for announcements to be more user-friendly and allow editing
  • Update storybook for these changes
  • Rename the notices table to announcements
  • Add new tests for these changes
  • Update docs with up-to-date screenshots and guides about these changes
  • Allow using markdown instead of HTML
  • Add a way for users to reset all hidden announcements

Copy link

github-actions bot commented Feb 7, 2025

API Changelog 4.17.2.dev24+gd840ec80

GET /api/v1/announcements

  • endpoint added

POST /api/v1/announcements

  • endpoint added

DELETE /api/v1/announcements/{announcement_id}

  • endpoint added

GET /api/v1/announcements/{announcement_id}

  • endpoint added

PATCH /api/v1/announcements/{announcement_id}

  • endpoint added

GET /api/v1/notices

  • ⚠️ api path removed without deprecation

POST /api/v1/notices

  • ⚠️ api path removed without deprecation

DELETE /api/v1/notices/{notice_id}

  • ⚠️ api path removed without deprecation

GET /api/v1/notices/{notice_id}

  • ⚠️ api path removed without deprecation

GET /api/v1/users/current/tokens

  • ⚠️ added the new 'UPDATE' enum value to the '/items/actual_scopes/admin/announcements/items/' response property for the response status '200'
  • ⚠️ added the new 'UPDATE' enum value to the '/items/requested_scopes/admin/announcements/items/' response property for the response status '200'

POST /api/v1/users/current/tokens

  • ⚠️ added the new 'UPDATE' enum value to the 'actual_scopes/admin/announcements/items/' response property for the response status '200'
  • ⚠️ added the new 'UPDATE' enum value to the 'requested_scopes/admin/announcements/items/' response property for the response status '200'
  • added the new 'UPDATE' enum value to the request property 'scopes/admin/announcements/items/'

GET /api/v1/users/{user_id}/permissions

  • ⚠️ added the new 'UPDATE' enum value to the 'admin/announcements/items/' response property for the response status '200'

@MoritzWeber0
Copy link
Member

I think that the "announcement" name is the best; let's consistently use announcements in Code & UI.
For HTML (and potentially markdown) it would be great to see a preview of the announcement banner before creation.

@zusorio zusorio changed the title feat: Rework notice integration feat: Rework announcement integration Feb 10, 2025
@zusorio zusorio force-pushed the rework-notices branch 3 times, most recently from 768e83f to 50e2757 Compare February 10, 2025 15:39
Copy link

github-actions bot commented Feb 10, 2025

A Storybook preview is available for commit d840ec8.
➡️ View Storybook
➡️ View Chromatic build

This comment has been minimized.

@zusorio zusorio force-pushed the rework-notices branch 2 times, most recently from 481ec3b to ad3afc0 Compare February 10, 2025 16:45
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.56%. Comparing base (f6d652b) to head (4b60525).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2181      +/-   ##
==========================================
+ Coverage   87.54%   87.56%   +0.02%     
==========================================
  Files         239      239              
  Lines        8198     8212      +14     
  Branches      568      569       +1     
==========================================
+ Hits         7177     7191      +14     
  Misses        861      861              
  Partials      160      160              

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

@zusorio zusorio force-pushed the rework-notices branch 2 times, most recently from 81b806a to fae1700 Compare February 10, 2025 17:42
@zusorio zusorio marked this pull request as ready for review February 10, 2025 17:45
@MoritzWeber0 MoritzWeber0 changed the title feat: Rework announcement integration feat!: Rework announcement integration Feb 11, 2025
Copy link
Member

@MoritzWeber0 MoritzWeber0 left a comment

Choose a reason for hiding this comment

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

Nice, love it!

@zusorio zusorio marked this pull request as draft February 11, 2025 15:04
@zusorio zusorio marked this pull request as ready for review February 12, 2025 11:30

This comment has been minimized.

This comment has been minimized.

Copy link

codecov bot commented Feb 13, 2025

Bundle Report

Changes will increase total bundle size by 9.42kB (0.07%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
capella-collab-manager-esm 13.93MB 9.42kB (0.07%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: capella-collab-manager-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 9.24kB 2.73MB 0.34%
assets/index-*.css 172 bytes 147.45kB 0.12%

Files in assets/index-*.js:

  • ./src/app/app.component.ts → Total Size: 3.84kB

  • ./src/app/app-routing.module.ts → Total Size: 30.29kB

This comment has been minimized.

This comment has been minimized.

Copy link

This report was generated by comparing d840ec8 with f6d652b.
If you would like to check difference, please check here.

change detected

ArtifactName: reg

item count
pass 446
change 8
new 24
delete 10
📝 Report

Differences

Identity Provider Error_desktop.png

actual Actual
expected Expected
difference Difference

Identity Provider Error_mobile.png

actual Actual
expected Expected
difference Difference

Login_desktop.png

actual Actual
expected Expected
difference Difference

Login_mobile.png

actual Actual
expected Expected
difference Difference

Logout_desktop.png

actual Actual
expected Expected
difference Difference

Logout_mobile.png

actual Actual
expected Expected
difference Difference

Session Expired_desktop.png

actual Actual
expected Expected
difference Difference

Session Expired_mobile.png

actual Actual
expected Expected
difference Difference

New Items

All Levels_desktop.png

NewItem

All Levels_mobile.png

NewItem

Dismissed Announcements_desktop.png

NewItem

Dismissed Announcements_mobile.png

NewItem

Logo Loading_desktop.png

NewItem

Logo Loading_mobile.png

NewItem

Narrow Logo_desktop.png

NewItem

Narrow Logo_mobile.png

NewItem

No Badge_desktop.png

NewItem

No Badge_mobile.png

NewItem

Loading_desktop.png

NewItem

Loading_mobile.png

NewItem

No Announcements_desktop.png

NewItem

No Announcements_mobile.png

NewItem

Some Announcements_desktop.png

NewItem

Some Announcements_mobile.png

NewItem

Dismissed Announcement That Is No Longer Visible_desktop.png

NewItem

Dismissed Announcement That Is No Longer Visible_mobile.png

NewItem

No Dismissed Announcements_desktop.png

NewItem

No Dismissed Announcements_mobile.png

NewItem

One Dismissed Announcement_desktop.png

NewItem

One Dismissed Announcement_mobile.png

NewItem

Two Dismissed Announcements_desktop.png

NewItem

Two Dismissed Announcements_mobile.png

NewItem

Deleted Items

All Levels_desktop.png

DeleteItem

All Levels_mobile.png

DeleteItem

Alert Expanded_desktop.png

DeleteItem

Alert Expanded_mobile.png

DeleteItem

Loading_desktop.png

DeleteItem

Loading_mobile.png

DeleteItem

No Alerts_desktop.png

DeleteItem

No Alerts_mobile.png

DeleteItem

Some Alerts_desktop.png

DeleteItem

Some Alerts_mobile.png

DeleteItem

@MoritzWeber0 MoritzWeber0 merged commit 1340531 into main Feb 14, 2025
35 checks passed
@MoritzWeber0 MoritzWeber0 deleted the rework-notices branch February 14, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants