-
-
Notifications
You must be signed in to change notification settings - Fork 164
Merge back master into updated-latest-electron #1277
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
base: updated-latest-electron
Are you sure you want to change the base?
Changes from all commits
3d5f9ec
bc3ceae
bcb9a2d
d624d26
d754ed7
aee35aa
7ab0460
f695ec4
8d6e677
b04e997
5e5889a
d8c0585
c3a4a9d
b3a6042
82955a6
6675e9b
c971c1b
a5fccfc
bcf7f48
4788055
a1af458
e46ba9a
1be24bb
316dfd1
64ec928
aadf72b
039c758
360dbb7
1ec04f6
d90260e
b7b82ba
ebed0ba
ec55082
5b5dc96
df9fa49
7450e0c
23794c4
3cf2e03
ac1414a
5a0cee0
e9e25fa
2214519
360025e
fb0ed66
acb5581
5f6a1d7
881bef3
d2c9bd5
6942472
b5da98a
a32576c
052aa8c
e83cd03
4568c12
0809c52
808e3af
9675339
397d66b
708a540
619ae10
4ffe10d
76ffb12
90f12d9
eccee53
a74eda7
d7b638e
194ce77
e483c45
4939501
090c368
a852d09
0b05270
7e52810
aa753c4
e0845d7
d981004
c1f0cdc
62d16f6
d0cded6
1bdcb9b
0c4ed41
8a29334
c6ee0c1
ea36799
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "pulsar", | ||
"author": "Pulsar-Edit <[email protected]>", | ||
"productName": "Pulsar", | ||
"version": "1.127.0-dev", | ||
"version": "1.127.1-dev", | ||
"description": "A Community-led Hyper-Hackable Text Editor", | ||
"branding": { | ||
"id": "pulsar", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"license": "MIT", | ||
"atomTestRunner": "runners/jasmine2-test-runner", | ||
"dependencies": { | ||
"tree-sitter-python": "0.19.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's please not add back a Tree-sitter dependency. |
||
}, | ||
"consumedServices": { | ||
"hyperlink.injection": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ let verticalScrollbarWidth, horizontalScrollbarHeight; | |
|
||
describe('TextEditorComponent', () => { | ||
beforeEach(() => { | ||
if (!window.customElements.get('text-editor-component-test-element')) { | ||
if(!window.customElements.get('text-editor-component-test-element')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No! These |
||
window.customElements.define( | ||
'text-editor-component-test-element', | ||
DummyElement | ||
|
@@ -3592,74 +3592,33 @@ describe('TextEditorComponent', () => { | |
}); | ||
|
||
it('does not attempt to render block decorations located outside the visible range', async () => { | ||
// Build a text editor with only two rows per tile. | ||
const { editor, element, component } = buildComponent({ | ||
const { editor, component } = buildComponent({ | ||
autoHeight: false, | ||
rowsPerTile: 2 | ||
}); | ||
|
||
// Set `line-height` to an integer to save us headaches later. (We | ||
// believe that Chromium used to guarantee fixed increments of line | ||
// height, but doesn't anymore — so we must specify it as an integer | ||
// value ourselves if we want the math to be simpler.) | ||
element.style.lineHeight = '20px'; | ||
component.measureCharacterDimensions(); | ||
|
||
// Make the editor tall enough to fit only two lines at a time. | ||
Comment on lines
-3600
to
-3608
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the additions in this file are purposeful; they're what I had to add to get specs to pass in Electron 30. They need to stay. |
||
await setEditorHeightInLines(component, 2); | ||
|
||
expect(component.getRenderedStartRow()).toBe(0); | ||
|
||
// This suggests one extra tile is rendered below the viewport just out | ||
// of view. (But why is this `4` rather than `3`, since we're | ||
// zero-indexed? This seems like a mistake in `getRenderedEndRow` logic.) | ||
expect(component.getRenderedEndRow()).toBe(4); | ||
|
||
// Create a marker spanning the fourth and fifth rows… | ||
const marker1 = editor.markScreenRange([[3, 0], [5, 0]], { | ||
reversed: false | ||
}); | ||
|
||
// …and decorate it with a DIV. | ||
const item1 = document.createElement('div'); | ||
editor.decorateMarker(marker1, { type: 'block', item: item1 }); | ||
|
||
// Repeat, but with the marker reversed. | ||
const marker2 = editor.markScreenRange([[3, 0], [5, 0]], { | ||
reversed: true | ||
}); | ||
const item2 = document.createElement('div'); | ||
editor.decorateMarker(marker2, { type: 'block', item: item2 }); | ||
|
||
await component.getNextUpdatePromise(); | ||
|
||
// We do not expect the first block decoration to be rendered; its head | ||
// is outside the renderered range. | ||
expect(item1.parentElement).toBeNull(); | ||
|
||
// But we expect the second decoration to be present because its head | ||
// _is_ within the rendered range. (Remember that a “reversed” marker has | ||
// its head _before_ its tail, but a non-reversed marker starts with its | ||
// tail and ends with its head. Read the text-buffer docs for `Marker` | ||
// for further understanding.) | ||
// | ||
// This comment does not imply understanding of the reasoning behind | ||
// this — just that this is the relevant difference in behavior between | ||
// the two decorations. | ||
expect(item2.nextSibling).toBe(lineNodeForScreenRow(component, 3)); | ||
|
||
// Scroll down so that the fifth line is the first one visible. | ||
await setScrollTop(component, 4 * component.getLineHeight()); | ||
|
||
// Again, lines 4-5-6-7 (zero-indexed) are understood to be visible, but | ||
// `getRenderedEndRow` will report an end row of `8`, which is its own | ||
// quirk. | ||
expect(component.getRenderedStartRow()).toBe(4); | ||
expect(component.getRenderedEndRow()).toBe(8); | ||
|
||
// Now the logic is reversed; the rendered range includes the head of | ||
// the first decoration, but not of the second decoration. Hence the | ||
// first decoration is renderered and the second isn't. | ||
expect(item1.nextSibling).toBe(lineNodeForScreenRow(component, 5)); | ||
expect(item2.parentElement).toBeNull(); | ||
}); | ||
|
@@ -5649,9 +5608,6 @@ describe('TextEditorComponent', () => { | |
rowsPerTile: 1, | ||
autoHeight: false | ||
}); | ||
// Set the initial line height to match that of the editor font size. | ||
element.style.lineHeight = Math.ceil(parseFloat(getComputedStyle(element).fontSize)) + 'px' | ||
component.measureCharacterDimensions(); | ||
await setEditorHeightInLines(component, 3); | ||
await setEditorWidthInCharacters(component, 20); | ||
component.setScrollTopRow(4); | ||
|
@@ -6035,8 +5991,6 @@ describe('TextEditorComponent', () => { | |
rowsPerTile: 3, | ||
autoHeight: false | ||
}); | ||
element.style.lineHeight = '20px'; | ||
component.measureCharacterDimensions(); | ||
element.style.height = | ||
4 * component.measurements.lineHeight + | ||
horizontalScrollbarHeight + | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mauricioszabo, can you revert the change on this line? Per the comment, this upload token should remain distinct on the
updated-latest-electron
branch.