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

Editor! #58

Closed
wants to merge 108 commits into from
Closed

Editor! #58

wants to merge 108 commits into from

Conversation

blaine
Copy link
Contributor

@blaine blaine commented Jul 12, 2018

No description provided.

tim-evans and others added 30 commits April 17, 2018 19:32
Specifically, we have cases where selecting nodes with no children
results in an ambiguous offset. Technically, these represent annotation
boundaries, but since we don't actually want to disambiguate these,
we're instead looking at pure textual offsets.

The major change here was simplifying the code that handles selection
on nodes with no children (cf, <hr>, <img>) and nodes that are outside
the text selection component.
…have lost the original DOM tree / selection
Specifically, we have cases where selecting nodes with no children
results in an ambiguous offset. Technically, these represent annotation
boundaries, but since we don't actually want to disambiguate these,
we're instead looking at pure textual offsets.

The major change here was simplifying the code that handles selection
on nodes with no children (cf, <hr>, <img>) and nodes that are outside
the text selection component.
…have lost the original DOM tree / selection
}

onSave(evt: Event) {
let textColor = this.shadowRoot.querySelector('.text-color');
Copy link
Contributor

Choose a reason for hiding this comment

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

@blaine Should this be grabbing the corresponding attribute instead of querying for the element?

this.getAttribute('text-color')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The color picker is pretty primitive, so it uses <input type=color> and this is just getting the element to propagate it up, using element.value to fetch the actual color value.

@@ -6,7 +6,7 @@
"module": "dist/modules/index.js",
"types": "dist/commonjs/index.d.ts",
"scripts": {
"build": "rm -rf dist; tsc -p . && tsc -p . --module ESNext --outDir dist/modules/ --target ES2017",
"build": "rm -rf dist; tsc -p . ; tsc -p . --module ESNext --outDir dist/modules/ --target ES2017; exit 0",
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is about updating "@atjson/document": "0.8.4" to 0.8.5

@@ -6,7 +6,7 @@
"module": "dist/modules/index.js",
"types": "dist/commonjs/index.d.ts",
"scripts": {
"build": "rm -rf dist; tsc -p . && tsc -p . --module ESNext --outDir dist/modules/ --target ES2017",
"build": "rm -rf dist; tsc -p . ; tsc -p . --module ESNext --outDir dist/modules/ --target ES2017; exit 0",
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is about updating "@atjson/document": "0.8.4" to 0.8.5

@tim-evans
Copy link
Collaborator

@blaine / @foobarrio this gist should help with a bunch of the TypeScript errors in the component:
https://gist.github.com/tim-evans/e1ac78674f94d0474b57a108b775701e

Blaine Cook and others added 4 commits August 31, 2018 22:16
This sets a TypeScript compilation context for ts files in test/ allowing VSCode (among other editors) to surface TypeScript errors.
@tim-evans tim-evans closed this Sep 26, 2018
@tim-evans tim-evans deleted the editor branch October 22, 2018 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants