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

Feature/99 alert mechanism #190

Merged
merged 10 commits into from
Oct 18, 2023
Merged

Feature/99 alert mechanism #190

merged 10 commits into from
Oct 18, 2023

Conversation

ekraffmiller
Copy link
Contributor

What this PR does / why we need it:

This PR adds logic to the JSDatasetMapper that will create DatasetAlert objects to be used in the Dataset View page

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Run the Cypress JSDatasetMapper unit test

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@coveralls
Copy link

coveralls commented Oct 3, 2023

Coverage Status

coverage: 98.394%. remained the same when pulling 9718e1e on feature/99-alert-mechanism into 403f161 on develop.

@ekraffmiller ekraffmiller requested a review from MellyGray October 3, 2023 13:38
@MellyGray MellyGray self-assigned this Oct 3, 2023
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

I really like the implementation of the Dataset Alerts as part of the Dataset model 🎉 I just left a few minor comments

I was also thinking about the other alerts, the ones that are not related with the Dataset Model but with certain behaviours of the user, such as 'there was an error when you clicked some button' Are we planning to implement those in the other alerts issue or should we create a new issue for this type of alerts not related with domain models?

src/dataset/domain/models/Dataset.ts Outdated Show resolved Hide resolved
).build()
}

static toVersion(
jDatasetVersionId: number,
jsDatasetVersionInfo: JSDatasetVersionInfo
jsDatasetVersionInfo: JSDatasetVersionInfo,
requestedVersion?: string
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some e2e tests that are checking the DatasetVersion that need to be fixed because of the added requestedVersion property

@MellyGray MellyGray assigned ekraffmiller and unassigned MellyGray Oct 3, 2023
@ekraffmiller
Copy link
Contributor Author

Hi Melina, I think I addressed all your change requests - the e2e test is failing, but in a different way on the github action than in my local environment - maybe that's because they are including different dataverse images?

@MellyGray
Copy link
Contributor

Hi Melina, I think I addressed all your change requests - the e2e test is failing, but in a different way on the github action than in my local environment - maybe that's because they are including different dataverse images?

@ekraffmiller the FileEmbargoDate component tests are still failing for me
image

Regarding the e2e tests running in the Github action, I had the same question and Guillermo told me that the Github Action is pointing to the dataverse develop branch image because ideally the backend changes should be merged before we start working on the frontend. But that's not the case right now, so some tests are failing in the GitHub action.

But apparently it's ok, now the backend PR's have been given priority, so hopefully the backend will be ahead of the frontend soon

So I ran the e2e locally and I'm having this error, but I already fixed it in another branch:

image

Then some e2e tests fail from time to time because of the wait(), Cypress doesn't like being waited for so long, sometimes it crashes, we'll have to address that at some point but for this PR, I think it's ok like this.

In summary, can you take a look at the unit tests for the FileEmbargoDate component? the e2e test are ok like this

@MellyGray MellyGray assigned ekraffmiller and unassigned MellyGray Oct 5, 2023
@ekraffmiller
Copy link
Contributor Author

Hi Melina, Gustavo suggested I create a spike for the question of the dates being returned by the API, so I created this issue IQSS/dataverse#9979. I think the locale logic is separate from the timezone issue, and we have agreement on using the user's locale, so I don't think this PR is dependent on that, but let me know what you think.

Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

LGTM 😄

@MellyGray MellyGray removed their assignment Oct 6, 2023
@kcondon kcondon self-assigned this Oct 16, 2023
@kcondon kcondon merged commit 74bb2de into develop Oct 18, 2023
5 of 6 checks passed
@kcondon kcondon deleted the feature/99-alert-mechanism branch October 18, 2023 20:55
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add alert messages management mechanism to the UI
4 participants