Skip to content

Commit

Permalink
Revert "Revert "refactor: remove MarkdownEditor and MarkdownViewer (#…
Browse files Browse the repository at this point in the history
…4782)" (…"

This reverts commit d4276ba.
  • Loading branch information
siddharthkp authored Aug 21, 2024
1 parent 587603b commit 95a54b0
Show file tree
Hide file tree
Showing 62 changed files with 29 additions and 5,708 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-apricots-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Remove the MarkdownEditor and MarkdownViewer components from Primer React
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
157 changes: 0 additions & 157 deletions docs/content/drafts/MarkdownEditor.mdx

This file was deleted.

103 changes: 0 additions & 103 deletions docs/content/drafts/MarkdownViewer.mdx

This file was deleted.

44 changes: 22 additions & 22 deletions e2e/components/drafts/ActionBar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import {themes} from '../../test-helpers/themes'
import {viewports} from '../../test-helpers/viewports'

test.describe('ActionBar', () => {
test.describe('Default state', () => {
test.describe('Default', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'drafts-components-actionbar--comment-box',
id: 'drafts-components-actionbar--default',
globals: {
colorScheme: theme,
},
})
expect(await page.screenshot()).toMatchSnapshot(`drafts.ActionBar.CommentBox.${theme}.png`)
expect(await page.screenshot()).toMatchSnapshot(`drafts.ActionBar.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'drafts-components-actionbar--comment-box',
id: 'drafts-components-actionbar--default',
globals: {
colorScheme: theme,
},
Expand All @@ -31,24 +31,24 @@ test.describe('ActionBar', () => {
})

test.describe('ActionBar Interactions', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('Overflow interaction @vrt', async ({page}) => {
await visit(page, {
id: 'drafts-components-actionbar--comment-box',
globals: {
colorScheme: theme,
},
})
const toolbarButtonSelector = `button[data-component="IconButton"]`
await expect(page.locator(toolbarButtonSelector)).toHaveCount(10)
await page.setViewportSize({width: viewports['primer.breakpoint.xs'], height: 768})
await expect(page.locator(toolbarButtonSelector)).toHaveCount(6)
const moreButtonSelector = page.getByLabel('More Comment box toolbar items')
await moreButtonSelector.click()
await expect(page.locator('ul[role="menu"]>li')).toHaveCount(5)
})
test('Overflow interaction @vrt', async ({page}) => {
await visit(page, {
id: 'drafts-components-actionbar--default',
})
}

await page.setViewportSize({width: viewports['primer.breakpoint.lg'], height: 768})

const toolbarButtonSelector = `button[data-component="IconButton"]`
await expect(page.locator(toolbarButtonSelector)).toHaveCount(10)

await page.setViewportSize({width: 320, height: 768})
await page.getByLabel('More Toolbar items').waitFor()

await expect(page.locator(toolbarButtonSelector)).toHaveCount(6)

const moreButtonSelector = page.getByLabel('More Toolbar items')
await moreButtonSelector.click()
await expect(page.locator('ul[role="menu"] > li')).toHaveCount(5)
})
})
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
"lint-staged": {
"**/*.{js,ts,tsx,md,mdx}": "npm run lint"
}
}
}
Loading

0 comments on commit 95a54b0

Please sign in to comment.