community-platform icon indicating copy to clipboard operation
community-platform copied to clipboard

feat: introduce content modified timestamp

Open iSCJT opened this issue 1 year ago • 2 comments

PR Checklist

PR Type

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Developer experience (improves developer workflows for contributing to the project)

Description

Implements a _lastEditTimestamp property to the document metadata which is only updated when a 'real' update/edit happens on a document. The platform was using the modified date but as this is updated when someone comments or votes useful etc. it was leading to incorrect/misleading last edit/update dates being shown when viewing how-to's and research.

Git Issues

Closes #

Screenshots/Videos

If useful, provide screenshot or capture to highlight main changes


What happens next?

Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).

If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.

If you need more immediate feedback you can try reaching out on Discord in the Community Platform development channel.

iSCJT avatar Jun 16 '23 12:06 iSCJT

Codecov Report

Patch coverage: 22.22% and project coverage change: -0.49 :warning:

Comparison is base (f5e1444) 43.21% compared to head (5cead68) 42.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2426      +/-   ##
==========================================
- Coverage   43.21%   42.72%   -0.49%     
==========================================
  Files         258      258              
  Lines        6998     7045      +47     
  Branches     1551     1581      +30     
==========================================
- Hits         3024     3010      -14     
- Misses       3947     4005      +58     
- Partials       27       30       +3     
Impacted Files Coverage Δ
src/modules/admin/pages/adminDatabase.tsx 0.00% <0.00%> (ø)
src/pages/Research/Content/ResearchListItem.tsx 20.58% <0.00%> (-2.00%) :arrow_down:
src/stores/Events/events.store.tsx 0.00% <0.00%> (ø)
src/stores/Maps/generatePins.tsx 18.18% <ø> (ø)
src/stores/databaseV2/DocReference.tsx 0.00% <0.00%> (ø)
src/test/factories/Howto.ts 100.00% <ø> (ø)
src/test/factories/ResearchItem.ts 88.88% <ø> (ø)
src/test/factories/User.ts 100.00% <ø> (ø)
...ontent/Howto/HowtoDescription/HowtoDescription.tsx 50.72% <100.00%> (+0.72%) :arrow_up:
src/pages/Research/Content/ResearchDescription.tsx 76.31% <100.00%> (+0.64%) :arrow_up:
... and 2 more

... and 7 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 16 '23 13:06 codecov[bot]

3 flaky tests on run #3621 ↗︎

0 90 0 0 Flakiness 3

Details:

fix: naming / linting
Project: onearmy-community-platform Commit: 5cead68b48
Status: Passed Duration: 04:04 💡
Started: Jun 18, 2023 3:13 PM Ended: Jun 18, 2023 3:17 PM
Flakiness  research/write.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Research] > [Edit a research article] > [By Owner] Output Screenshots
Flakiness  map.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
map > [By User] > should show the user a message stating their pin is rejected Output Screenshots
Flakiness  common.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Common] > [User Menu] > [By Authenticated] Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

cypress[bot] avatar Jun 16 '23 13:06 cypress[bot]

:tada: This PR is included in version 1.66.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

onearmy-bot avatar Jun 23 '23 15:06 onearmy-bot