Skip to content

Commit

Permalink
feat: rename package @remirror/editor-twitter
Browse files Browse the repository at this point in the history
BREAKING CHANGE
  • Loading branch information
ifiokjr committed Jun 18, 2019
1 parent 6190456 commit 810662e
Show file tree
Hide file tree
Showing 33 changed files with 50 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ const config = require('../../support/jest/jest.config');

module.exports = {
...config,
name: '@remirror/ui-twitter',
displayName: 'ui-twitter',
name: '@remirror/editor-twitter',
displayName: 'editor-twitter',
};
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@remirror/ui-twitter",
"name": "@remirror/editor-twitter",
"description": "ui for a twitter-like editing experience",
"license": "MIT",
"author": "Ifiok Jr. <ifiokotung@gmail.com>",
"homepage": "https://github.com/ifiokjr/remirror/tree/master/@remirror/ui-twitter",
"homepage": "https://github.com/ifiokjr/remirror/tree/master/@remirror/editor-twitter",
"repository": {
"type": "git",
"url": "https://github.com/ifiokjr/remirror.git",
"directory": "@remirror/ui-twitter"
"directory": "@remirror/editor-twitter"
},
"version": "0.1.0",
"main": "lib/index.js",
"module": "lib/dist/ui-twitter.esm.js",
"module": "lib/dist/editor-twitter.esm.js",
"files": [
"lib",
"src"
Expand Down Expand Up @@ -53,6 +53,6 @@
"publishConfig": {
"access": "public"
},
"cjs": "lib/dist/ui-twitter.cjs.js",
"cjs": "lib/dist/editor-twitter.cjs.js",
"sideEffects": false
}
21 changes: 21 additions & 0 deletions @remirror/editor-twitter/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div align="center">
<br />
<div align="center">
<img width="300" src="https://cdn.jsdelivr.net/gh/ifiokjr/remirror/support/assets/logo-icon.svg" alt="remirror" />
<h1 align="center">editor-twitter</h1>
</div>
<br />
<br />
<br />
<br />
</div>

[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@remirror/editor-twitter.svg?style=for-the-badge)](https://bundlephobia.com/result?p=@remirror/editor-twitter) [![npm](https://img.shields.io/npm/dm/@remirror/editor-twitter.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@remirror/editor-twitter) [![Dependencies (path)](https://img.shields.io/david/ifiokjr/remirror.svg?logo=npm&path=@remirror%2Feditor-twitter&style=for-the-badge)](https://github.com/ifiokjr/remirror/blob/master/@remirror/editor-twitter/package.json) [![NPM](https://img.shields.io/npm/l/@remirror/editor-twitter.svg?style=for-the-badge)](https://github.com/ifiokjr/remirror/blob/master/LICENSE) [![GitHub issues by-label](https://img.shields.io/github/issues/ifiokjr/remirror/@remirror/editor-twitter.svg?label=Open%20Issues&logo=github&style=for-the-badge)](https://github.com/ifiokjr/remirror/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%40remirror%2Feditor-twitter) [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/ifiokjr/remirror/@remirror/editor-twitter.svg?label=Open%20Pull%20Requests&logo=github&style=for-the-badge)](https://github.com/ifiokjr/remirror/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3A%40remirror%2Feditor-twitter)

A configurable editor which replicates twitter behaviour and much of its design.

## Installation

```bash
yarn add @remirror/editor-twitter
```
2 changes: 2 additions & 0 deletions @remirror/editor-twitter/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './components/twitter.editor';
export * from './types';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

import React from 'react';
// tslint:disable-next-line:no-implicit-dependencies
import { renderToStaticMarkup } from 'react-dom/server';
import { cloneElement } from '../helpers';

Expand Down
2 changes: 1 addition & 1 deletion @remirror/showcase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"@fortawesome/react-fontawesome": "^0.1.4",
"@remirror/core": "0.1.0",
"@remirror/core-extensions": "0.1.0",
"@remirror/editor-twitter": "0.1.0",
"@remirror/extension-emoji": "0.1.0",
"@remirror/react": "0.1.0",
"@remirror/react-utils": "0.1.0",
"@remirror/ui-twitter": "0.1.0",
"@remirror/ui-wysiwyg": "0.1.0",
"deepmerge": "^3.2.1",
"emoji-mart": "2.11.1",
Expand Down
2 changes: 1 addition & 1 deletion @remirror/showcase/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ yarn add @remirror/showcase
The recommendation is to import from the direct files.

```tsx
import { UITwitterDemo, UITwitterDemoProps } from '@remirror/showcase/lib/ui-twitter';
import { UITwitterDemo, UITwitterDemoProps } from '@remirror/showcase/lib/editor-twitter';

const MyEditor = () => <UITwitterDemo />;
```
4 changes: 2 additions & 2 deletions @remirror/showcase/src/twitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
OnQueryChangeParams,
TwitterUI,
TwitterUserData,
} from '@remirror/ui-twitter';
} from '@remirror/editor-twitter';
import emojiData from 'emoji-mart/data/all.json';

import { startCase, take } from '@remirror/core';
Expand Down Expand Up @@ -60,7 +60,7 @@ export const ExampleTwitterUI = () => {
return (
<TwitterUI
emojiData={emojiData}
attributes={{ 'data-testid': 'ui-twitter' }}
attributes={{ 'data-testid': 'editor-twitter' }}
userData={userMatches}
tagData={tagMatches}
onMentionStateChange={onMentionStateChange}
Expand Down
21 changes: 0 additions & 21 deletions @remirror/ui-twitter/readme.md

This file was deleted.

2 changes: 0 additions & 2 deletions @remirror/ui-twitter/src/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Create tests inside of a `__tests__/` subfolder.
- Unit tests: `*.spec.ts(x)`
- Integration tests: `*.puppeteer.ts` within the e2e folder
Integration testing uses puppeteer to run browser tests in chrome. See an example in `/docs/editors/__tests__/ui-twitter.test.ts`
Integration testing uses puppeteer to run browser tests in chrome. See an example in `/docs/editors/__tests__/editor-twitter.test.ts`
Currently the testing strategy for remirror is being worked out. The test coverage is a measly 30% and a lot of work needs to be done to bring this to an acceptable level.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menu: Guides
route: /guides/quickstart
---

Remirror is comprised of core librarys like `@remirror/core` and UI libraries like `@remirror/ui-twitter`.
Remirror is comprised of core librarys like `@remirror/core` and UI libraries like `@remirror/editor-twitter`.

The easiest way to get started is by using a UI library and for the purposes of this demonstration we're going to use the package `@remirror/ui-wysiwyg`

Expand Down
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@remirror/renderer-react": ["../@remirror/renderer-react/src/index.ts"],
"@remirror/showcase": ["../@remirror/showcase/src/index.ts"],
"@remirror/showcase/lib/*": ["../@remirror/showcase/src/*"],
"@remirror/ui-twitter": ["../@remirror/ui-twitter/src"],
"@remirror/editor-twitter": ["../@remirror/editor-twitter/src"],
"@remirror/ui-wysiwyg": ["../@remirror/ui-wysiwyg/src"],
"jest-remirror": ["../packages/jest-remirror/src"],
"jest-prosemirror": ["../packages/jest-prosemirror/src"],
Expand Down
2 changes: 1 addition & 1 deletion examples/with-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
"@remirror/core": "0.1.0",
"@remirror/core-extensions": "0.1.0",
"@remirror/editor-twitter": "0.1.0",
"@remirror/react": "0.1.0",
"@remirror/showcase": "0.1.0",
"@remirror/ui-twitter": "0.1.0",
"@remirror/ui-wysiwyg": "0.1.0",
"emoji-mart": "2.11.1",
"lodash": "4.17.11",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const EpicModeHeart: FunctionComponent = () => (

### Twitter

![Twitter UI Example](/support/assets/ui-twitter-example.gif)
![Twitter UI Example](/support/assets/editor-twitter-example.gif)

<br />

Expand Down
10 changes: 5 additions & 5 deletions support/.size-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@
}
}
},
"@remirror/ui-twitter/lib/dist/ui-twitter.cjs.js": {
"@remirror/editor-twitter/lib/dist/editor-twitter.cjs.js": {
"bundled": 34948,
"minified": 24590,
"gzipped": 6281
},
"@remirror/ui-twitter/lib/dist/ui-twitter.esm.js": {
"@remirror/editor-twitter/lib/dist/editor-twitter.esm.js": {
"bundled": 34166,
"minified": 23897,
"gzipped": 6160,
Expand Down Expand Up @@ -455,12 +455,12 @@
}
}
},
"../@remirror/ui-twitter/lib/index.js": {
"../@remirror/editor-twitter/lib/index.js": {
"bundled": 34722,
"minified": 24412,
"gzipped": 6246
},
"../@remirror/ui-twitter/lib/dist/ui-twitter.esm.js": {
"../@remirror/editor-twitter/lib/dist/editor-twitter.esm.js": {
"bundled": 36612,
"minified": 26061,
"gzipped": 6527,
Expand Down Expand Up @@ -548,7 +548,7 @@
"minified": 16090,
"gzipped": 5619
},
"../@remirror/ui-twitter/lib/dist/ui-twitter.cjs.js": {
"../@remirror/editor-twitter/lib/dist/editor-twitter.cjs.js": {
"bundled": 37469,
"minified": 26806,
"gzipped": 6649
Expand Down
4 changes: 2 additions & 2 deletions support/rollup/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import reactUtils from '../../@remirror/react-utils/package.json';
import remirror from '../../packages/remirror/package.json';
import rendererReact from '../../@remirror/renderer-react/package.json';
import showcase from '../../@remirror/showcase/package.json';
import uiTwitter from '../../@remirror/ui-twitter/package.json';
import editorTwitter from '../../@remirror/editor-twitter/package.json';
import uiWysiwyg from '../../@remirror/ui-wysiwyg/package.json';

const configurations = [
Expand All @@ -27,7 +27,7 @@ const configurations = [
...factory(remirror, 'packages'),
...factory(rendererReact, '@remirror'),
...factory(showcase, '@remirror'),
...factory(uiTwitter, '@remirror'),
...factory(editorTwitter, '@remirror'),
...factory(uiWysiwyg, '@remirror'),
];

Expand Down
2 changes: 1 addition & 1 deletion support/scripts/live-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var params = {
// ignore: 'scss,my/templates', // comma-separated string for paths to ignore
file: 'index.html', // When set, serve this file (server root relative) for every 404 (useful for single-page applications)
// wait: 1000, // Waits for all changes, before reloading. Defaults to 0 sec.
mount: [['/editors/ui-twitter', baseDir('docs/.docz/dist-coverage/index.html')]], // Mount a directory to a route.
mount: [['/editors/editor-twitter', baseDir('docs/.docz/dist-coverage/index.html')]], // Mount a directory to a route.
// logLevel: 2, // 0 = errors only, 1 = some, 2 = lots
// middleware: [
// function(req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion support/storybook/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const moduleResolver = [
'@remirror/react-ssr': '../../@remirror/react-ssr/src',
'@remirror/renderer-react': '../../@remirror/renderer-react/src',
'@remirror/showcase': '../../@remirror/showcase/src',
'@remirror/ui-twitter': '../../@remirror/ui-twitter/src',
'@remirror/editor-twitter': '../../@remirror/editor-twitter/src',
'@remirror/ui-wysiwyg': '../../@remirror/ui-wysiwyg/src',
remirror: '../../packages/remirror/src',
},
Expand Down
2 changes: 1 addition & 1 deletion support/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@remirror/renderer-react": ["@remirror/renderer-react/src/index.ts"],
"@remirror/showcase": ["@remirror/showcase/src/index.ts"],
"@remirror/showcase/lib/*": ["@remirror/showcase/src/*"],
"@remirror/ui-twitter": ["@remirror/ui-twitter/src"],
"@remirror/editor-twitter": ["@remirror/editor-twitter/src"],
"@remirror/ui-wysiwyg": ["@remirror/ui-wysiwyg/src"],
"jest-remirror": ["packages/jest-remirror/src"],
"jest-prosemirror": ["packages/jest-prosemirror/src"],
Expand Down

0 comments on commit 810662e

Please sign in to comment.