Skip to content

Commit c095751

Browse files
author
Fabian Stoehr
committed
Merge branch 'master' into bug_viewer_crash
2 parents 13c7a4a + 88cc3f9 commit c095751

51 files changed

Lines changed: 341 additions & 337 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [ main ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ main ]
1111

1212
jobs:
1313
build:
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- run: npm install
26-
- run: npm test
26+
- run: npm test -- --coverage
2727
- name: Upload coverage to Codecov
2828
uses: codecov/codecov-action@v5
2929
env:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Contributions to Mirador are always welcome!
77

88
It is always helpful to begin any large change by submitting an issue or engaging with the Mirador community. Mirador 3.0 and beyond adheres to [semantic versioning](https://semver.org/) so that adopters and contributors can better understand what changes can be expected in released versions of the software.
99

10-
All contributions should be submitted as a [GitHub pull request](https://help.github.com/articles/about-pull-requests/) to the master branch. Pull requests must be reviewed and accepted by another Mirador maintainer and pass all continuous integration checks. Contributions should have tests for the feature or bug fix, documentation, should maintain high code coverage, and should conform to the Mirador agreed-upon coding style. Contributions should not include a “built” version of Mirador—this will help to reduce merge conflicts.
10+
All contributions should be submitted as a [GitHub pull request](https://help.github.com/articles/about-pull-requests/) to the main branch. Pull requests must be reviewed and accepted by another Mirador maintainer and pass all continuous integration checks. Contributions should have tests for the feature or bug fix, documentation, should maintain high code coverage, and should conform to the Mirador agreed-upon coding style. Contributions should not include a “built” version of Mirador—this will help to reduce merge conflicts.
1111

1212
### Code of Conduct
13-
Everyone interacting in this community is expected to follow the [Mirador Code of Conduct](https://github.com/ProjectMirador/mirador/blob/master/CODE_OF_CONDUCT.md).
13+
Everyone interacting in this community is expected to follow the [Mirador Code of Conduct](https://github.com/ProjectMirador/mirador/blob/main/CODE_OF_CONDUCT.md).
1414

1515
### Accessibility
1616
Mirador 3 aims to comply with the [Web Content Accessibility Guidelines (WCAG) 2.1 AA](https://www.w3.org/WAI/standards-guidelines/wcag/). These guidelines, authored by the W3C and legally adopted [internationally](https://www.w3.org/WAI/policies/?q=wcag-20), are comprehensive and provide the success criteria designers and developers need to build accessible web applications.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Mirador
2-
![Node.js CI](https://github.com/ProjectMirador/mirador/workflows/Node.js%20CI/badge.svg) [![codecov](https://codecov.io/gh/ProjectMirador/mirador/branch/master/graph/badge.svg)](https://codecov.io/gh/ProjectMirador/mirador)
2+
![Node.js CI](https://github.com/ProjectMirador/mirador/workflows/Node.js%20CI/badge.svg) [![codecov](https://codecov.io/gh/ProjectMirador/mirador/branch/main/graph/badge.svg)](https://codecov.io/gh/ProjectMirador/mirador)
33

44
## For Mirador Users
55
You can quickly use and configure Mirador by remixing the [mirador-start](https://mirador-start.glitch.me/) Glitch.
@@ -14,7 +14,7 @@ $ npm install mirador
1414
$ yarn add mirador
1515
```
1616

17-
If you are interested in integrating Mirador with plugins into your project, we recommend using webpack or parcel to integrate the es version of the packages. Examples are here:
17+
If you are interested in integrating Mirador with plugins into your project, we recommend using vite to integrate the es version of the packages. Examples are here:
1818

1919
[https://github.com/ProjectMirador/mirador-integration](https://github.com/ProjectMirador/mirador-integration)
2020

@@ -24,7 +24,7 @@ If you want to simply embed Mirador in an HTML page without further customizatio
2424
<script src="https://unpkg.com/mirador@latest/dist/mirador.min.js"></script>
2525
```
2626

27-
More examples of embedding Mirador can be found at [https://github.com/ProjectMirador/mirador/wiki/M3-Embedding-in-Another-Environment#in-an-html-document-with-javascript](https://github.com/ProjectMirador/mirador/wiki/M3-Embedding-in-Another-Environment#in-an-html-document-with-javascript).
27+
More examples of embedding Mirador can be found at [https://github.com/ProjectMirador/mirador/wiki/M3-Embedding-in-Another-Environment#in-an-html-document-with-javascript](https://github.com/ProjectMirador/mirador/wiki/Embedding-in-Another-Environment).
2828

2929
## Adding translations to Mirador
3030
For help with adding a translation, see [src/locales/README.md](src/locales/README.md)

__tests__/src/components/AccessTokenSender.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('AccessTokenSender', () => {
2222
it('renders properly', () => {
2323
const { container } = createWrapper({ url: 'http://example.com' });
2424

25-
expect(container.querySelector('iframe')).toHaveAttribute('src', 'http://example.com?origin=http://localhost&messageId=http://example.com'); // eslint-disable-line testing-library/no-node-access, testing-library/no-container
25+
expect(container.querySelector('iframe')).toHaveAttribute('src', 'http://example.com/?origin=http%3A%2F%2Flocalhost&messageId=http%3A%2F%2Fexample.com'); // eslint-disable-line testing-library/no-node-access, testing-library/no-container
2626
});
2727

2828
it('triggers an action when the iframe sends a message', () => {

__tests__/src/components/CanvasInfo.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe('CanvasInfo', () => {
1414
canvasLabel="The Canvas Label"
1515
canvasDescription="The Canvas Description"
1616
canvasMetadata={metadata}
17-
id="xyz"
1817
/>,
1918
);
2019
});
@@ -45,7 +44,7 @@ describe('CanvasInfo', () => {
4544
describe('when metadata is not present', () => {
4645
beforeEach(() => {
4746
render(
48-
<CanvasInfo id="xyz" />,
47+
<CanvasInfo />,
4948
);
5049
});
5150

__tests__/src/components/CollectionInfo.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { CollectionInfo } from '../../../src/components/CollectionInfo';
66
function createWrapper(props) {
77
return render(
88
<CollectionInfo
9-
id="test"
109
collectionPath={[1, 2]}
1110
showCollectionDialog={() => {}}
1211
{...props}

__tests__/src/components/GalleryViewThumbnail.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ describe('GalleryView', () => {
7373
describe('on-demand annotation fetching', () => {
7474
const canvas = {
7575
getHeight: () => 50,
76+
getLabel: () => ({ getValue: () => 'label' }),
7677
getServices: vi.fn(),
7778
getThumbnail: vi.fn(),
7879
getType: vi.fn(),

__tests__/src/components/ManifestInfo.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ describe('ManifestInfo', () => {
88
beforeEach(() => {
99
render(
1010
<ManifestInfo
11-
id="xyz"
1211
manifestLabel="The Manifest Label"
1312
manifestDescription="The Manifest Description"
1413
manifestMetadata={metadata}
@@ -42,7 +41,7 @@ describe('ManifestInfo', () => {
4241
describe('when metadata is not present', () => {
4342
beforeEach(() => {
4443
render(
45-
<ManifestInfo id="xyz" />,
44+
<ManifestInfo />,
4645
);
4746
});
4847

__tests__/src/components/WindowSideBarCanvasPanel.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function createWrapper(props) {
1313
let sequences;
1414

1515
if (props.multipleSequences) {
16-
sequences = [{ id: 'a', label: 'seq1' },
17-
{ id: 'b', label: 'seq2' }];
16+
sequences = [{ getLabel: () => ({ getValue: () => undefined }), id: 'a', label: 'seq1' },
17+
{ getLabel: () => ({ getValue: () => undefined }), id: 'b', label: 'seq2' }];
1818
} else {
1919
sequences = Utils.parseManifest(manifestJson).getSequences();
2020
}

__tests__/src/components/WindowTopMenuButton.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ describe('WindowTopMenuButton', () => {
4747
render(<Subject />);
4848
await user.click(screen.getByLabelText('Window views & thumbnail display'));
4949
// when 'open' is true, aria-owns is set to the id of the window
50-
expect(screen.getByLabelText('Window views & thumbnail display')).toHaveAttribute('aria-owns', 'window-menu_xyz'); // eslint-disable-line testing-library/no-node-access
50+
expect(screen.getByLabelText('Window views & thumbnail display')).toHaveAttribute('aria-owns'); // eslint-disable-line testing-library/no-node-access
5151
});
5252
});

0 commit comments

Comments
 (0)