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

Add ability to open old report viewers #2085

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Kr0nox
Copy link
Member

@Kr0nox Kr0nox commented Nov 30, 2024

This PR adds the ability to open report viewers for older versions in local mode.

When a zip from a version that is not supported by the newest viewer gets uploaded, the user gets redirected to a seperate view that informs the user of this and offers them to open the viewer supports the report.

This PR currently only includes the report viewer that was published with version 5.1.0, which accepts reports dating back to version 4.2.0. Should a report viewer that accepts results from versions 4.0.0 and 4.1.0 also be included?

View for opening old versions

relates to #1190

@Kr0nox Kr0nox added enhancement Issue/PR that involves features, improvements and other changes report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies labels Nov 30, 2024
@Kr0nox Kr0nox requested review from sebinside, TwoOfTwelve and a team November 30, 2024 12:24
@dfuchss
Copy link
Member

dfuchss commented Nov 30, 2024

I would not include all old versions of the viewer. I'd suggest that it only shows something like "Please use JPlag vX.Y" and then a user can download the resp. version of JPlag

@tsaglam tsaglam added the major Major issue/feature/contribution/change label Dec 3, 2024
@tsaglam
Copy link
Member

tsaglam commented Dec 3, 2024

I would not include all old versions of the viewer. I'd suggest that it only shows something like "Please use JPlag vX.Y" and then a user can download the resp. version of JPlag

I agree; I think until including 4.2.0 should be enough...

@Kr0nox Kr0nox added this to the 6.0.0 milestone Jan 16, 2025
Copy link

Copy link

Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few ideas regarding wording.

cli/src/main/resources/v5/index.html Show resolved Hide resolved
Comment on lines +22 to +26
const bodyContent = await page.locator('body').textContent()
expect(bodyContent).toContain('You are trying to open a report from an older version of JPlag')
expect(bodyContent).toContain(oldVersion.version)
expect(bodyContent).toContain('You can access the old report viewer here:')
expect(bodyContent).toContain('Open old report viewer')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const bodyContent = await page.locator('body').textContent()
expect(bodyContent).toContain('You are trying to open a report from an older version of JPlag')
expect(bodyContent).toContain(oldVersion.version)
expect(bodyContent).toContain('You can access the old report viewer here:')
expect(bodyContent).toContain('Open old report viewer')
const bodyContent = await page.locator('body').textContent()
expect(bodyContent).toContain('You are trying to open a report created with an older version of JPlag')
expect(bodyContent).toContain(oldVersion.version)
expect(bodyContent).toContain('You can still view this report here:')
expect(bodyContent).toContain('Open with old report viewer')

Comment on lines +19 to +29
<div class="space-y-2">
<h3 class="text-2xl font-bold">
You are trying to open a report from an older version of JPlag
</h3>
<p class="text-xl">
The report you are trying to open has version {{ uploadedVersion.toString() }}. <br />
The current version of JPlag is {{ reportViewerVersion.toString() }}. The report viewer
can open reports from version {{ minimalReportVersion.toString() }}<br />
You can access the old report viewer here:
</p>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<div class="space-y-2">
<h3 class="text-2xl font-bold">
You are trying to open a report from an older version of JPlag
</h3>
<p class="text-xl">
The report you are trying to open has version {{ uploadedVersion.toString() }}. <br />
The current version of JPlag is {{ reportViewerVersion.toString() }}. The report viewer
can open reports from version {{ minimalReportVersion.toString() }}<br />
You can access the old report viewer here:
</p>
</div>
<div class="space-y-2">
<h3 class="text-2xl font-bold">
You are trying to open a report created with an older version of JPlag
</h3>
<p class="text-xl">
Your report was created with JPlag version {{ uploadedVersion.toString() }}. <br />
The current version of JPlag is {{ reportViewerVersion.toString() }}. It supports reports starting from version {{ minimalReportVersion.toString() }}<br />
You can still view the old report here:
</p>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes major Major issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants