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

nsc-events-nextjs-256-archive-functionality #257

Merged
merged 8 commits into from
Apr 23, 2024

Conversation

Ali-7s
Copy link
Contributor

@Ali-7s Ali-7s commented Apr 16, 2024

  • Created ArchiveDialog component with functions for archiving event
  • Added isArchived to activityDatabase
427d3620-e0cf-438d-9682-0ac4916f3b5a.mp4

@Ali-7s Ali-7s requested a review from a team as a code owner April 16, 2024 23:57
@Ali-7s Ali-7s requested review from bcko, Seiyaroo, heosman and brinkbrink and removed request for a team April 16, 2024 23:57
@Ali-7s Ali-7s linked an issue Apr 17, 2024 that may be closed by this pull request
Copy link
Contributor

@Seiyaroo Seiyaroo left a comment

Choose a reason for hiding this comment

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

This looks awesome Ali, well done!

@cshimm
Copy link
Contributor

cshimm commented Apr 17, 2024

I'm having trouble getting this to work.
I clicked Archive from the event details page, got a confirmation window, and clicked "Archive". I got a toast message that said "Successfully archived event" and then am redirected to the home page. However, the event still appears in the list and has no "isArchived" key in Mongodb. I tested this with an event I created in the UI (/create-event URL).
Here is the document that was created from the create-event route:
image
Should I be testing this with an alternate event creation method? I noticed I was getting a 404 back when trying to make the archive API call
image

@taylorpapke taylorpapke self-requested a review April 18, 2024 08:03
Copy link
Contributor

@taylorpapke taylorpapke left a comment

Choose a reason for hiding this comment

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

So, I tested this PR and it is working as far as archiving events on the frontend and making the proper changes to the data on the backend:
Screenshot 2024-04-18 at 1 02 38 AM

However, I am running into an issue with creating events now. When I create an event, it will not display on the home page. I tested main and it is working so I think it might have to do with some of the changes that were made to HomeEventGetter.tsx or UpcomingEvent.tsx components. @keiffer213

@heosman
Copy link
Contributor

heosman commented Apr 18, 2024

I'm experiencing the same thing as @taylorpapke. I am able to archive the event successfully, the event is hidden on the frontend, and the backend is updated. I didn't create new events, but I do have other events that I have had for a while and they are not displaying even when there are less than 5 events visible. I think the other events not showing up may have to do with what we talked about with BC last quarter: how the events being displayed are limited to 5 events, except the deleted and archived events are still in the database but hidden, so our other events including new ones won't show up. I could be wrong though.

@cshimm This PR was just merged. Pull the changes in the backend and then try again. It might not been working for you because you were not running that PR on the backend at the same time with this PR.

@brinkbrink brinkbrink enabled auto-merge (squash) April 19, 2024 00:47
@Ali-7s
Copy link
Contributor Author

Ali-7s commented Apr 19, 2024

So, I tested this PR and it is working as far as archiving events on the frontend and making the proper changes to the data on the backend: Screenshot 2024-04-18 at 1 02 38 AM

However, I am running into an issue with creating events now. When I create an event, it will not display on the home page. I tested main and it is working so I think it might have to do with some of the changes that were made to HomeEventGetter.tsx or UpcomingEvent.tsx components. @keiffer213

As Hanan said there's a 5 event limit thats fetched from the backend, when we call archive we're only hiding the event on the frontend and adding any more then 5 won't show on the frontend unless we delete any of the first 5 from the database.

@Ali-7s Ali-7s requested a review from taylorpapke April 19, 2024 03:09
@cshimm
Copy link
Contributor

cshimm commented Apr 19, 2024

I got it working, thanks for the info @heosman

@heosman
Copy link
Contributor

heosman commented Apr 23, 2024

@Ali-7s @taylorpapke Let's get this PR reviewed and merged, and then address the 5 event limit in another issue. I'll add it to the product backlog for now.

@brinkbrink brinkbrink dismissed taylorpapke’s stale review April 23, 2024 17:55

PO would like to merge now and address the five event limit in another user story

Copy link
Contributor

@brinkbrink brinkbrink left a comment

Choose a reason for hiding this comment

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

I am approving this review at the request of the product owner. The user story requirements are fulfilled with this pull request. The five event functionality will be addressed in the next sprint.

@brinkbrink brinkbrink merged commit ceb4f45 into main Apr 23, 2024
4 checks passed
@heosman heosman deleted the feature-256-archive-functionality branch May 15, 2024 03:21
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.

Event Details Page: Add functionality to archive button
6 participants