Skip to content

Commit

Permalink
Merge pull request #676 from colonial-heritage/notification
Browse files Browse the repository at this point in the history
Show notification after local context notice is added
  • Loading branch information
barbarah authored Jun 26, 2024
2 parents 1dae173 + 95b3042 commit ac2fb2f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/researcher/e2e/object-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test.describe('Object list page logged in', () => {
await gotoSignedIn(objectUrl);
await page.getByTestId('popover-menu-button').hover();
await page.getByTestId(`object-list-${listId}`).click();
await expect(page.getByTestId('notification')).toHaveCount(2);
await expect(page.getByTestId('notification')).toHaveCount(3);
await page.goto(`/en/communities/${community.slug}/${listId}`);
await expect(page.getByTestId('object-card')).toHaveCount(1);
});
Expand Down
2 changes: 1 addition & 1 deletion apps/researcher/e2e/object.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test.describe('Object details page logged in', () => {
.getByTestId('enrichment-form')
.locator('button[type="submit"]')
.click();
await expect(page.getByTestId('notification')).toHaveCount(2, {
await expect(page.getByTestId('notification')).toHaveCount(3, {
timeout: 30000,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import {localContextsNoticesEnrichmentFetcher} from '@/lib/enricher-instances';
import Image from 'next/image';
import useObject from '../use-object';
import {localContextsNoticeEnrichmentTypeMapping} from './mapping';
import {LocalizedMarkdown, SlideOutButton} from '@colonial-collections/ui';
import {
LocalizedMarkdown,
Notifications,
SlideOutButton,
} from '@colonial-collections/ui';
import {ChatBubbleBottomCenterTextIcon} from '@heroicons/react/24/outline';
import {SignedInWithCommunitySideOut} from '@/components/slide-outs';
import {LocalContextsNoticeForm} from './form';
Expand Down Expand Up @@ -72,6 +76,7 @@ export default async function LocalContextsNotices() {
})}
</p>
<AddLocalContextsNotice />
<Notifications />
<div className="w-full mt-4">
{noticesToDisplay.map(notice => (
<div
Expand Down
2 changes: 1 addition & 1 deletion apps/researcher/src/messages/nl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"descriptionSubTitle": "Hier kunt u tekst invoegen over het gebruik van deze Local Context Notice.",
"inLanguage": "Taal",
"languageSubTitle": "Selecteer een taal van het verhaal. Begin met typen om een taal te selecteren.",
"successfullyAdded": "Uw verhaal is toegevoegd aan het object. Het kan even duren voordat het zichtbaar is.",
"successfullyAdded": "Uw Local Context Notice is toegevoegd aan het object. Het kan even duren voordat het zichtbaar is.",
"community": "Community",
"communityDescription": "Selecteer de community namens wie u spreekt.",
"communityRequired": "Community is vereist",
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwind-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
800: 'hsl(216, 35%, 20%)',
900: 'hsl(216, 35%, 10%)',
},
' green-grey': {
'green-grey': {
50: 'hsl(170, 35%, 97%)',
100: 'hsl(170, 35%, 90%)',
200: 'hsl(170, 35%, 80%)',
Expand Down

0 comments on commit ac2fb2f

Please sign in to comment.