Git Product home page Git Product logo

nota's Introduction

Metrics

nota's People

Contributors

aasteria avatar bistard avatar cindy-cyber avatar dependabot[bot] avatar ducksoup0203 avatar jodyz0203 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nota's Issues

Milestone - February (二月) - 2022

Common Codes

  • New emitters
  • ...

User interface

  • Scrollable
  • ...

Workbench

  • KeyboardService - basic functionality
  • ShortcutService - basic functionality
  • IpcService - basic functionality

Unit Tests

  • shortcutService related unit tests.
  • Emitters

[AsyncMultiTreeModel] memory usage optimization - remove the duplicate holding tree structure

Describe the bug
When creating an AsyncMultiTree, it contains a MultiTree and an AsyncMultiTreeModel. Both of them are maintaining the same tree structure except that AsyncMultiTreeModel maintains a tree node type IAsyncTreeNode.

The reason for having the same tree structure inside the model is that every MultiTree.splice() call will rerender the whole view. Each IAsyncMultiTree.refresh() call might cause too many render calls. That is why we need to maintain the same tree structure, once the build process is finished, we only need to render once in the IAsyncMultiTree.

Expected behaviour
Try to remove the duplicate tree structure in AsyncMultiTreeModel. THIS MAY SAVE A HUGE AMOUNT OF MEMORY USAGE👍!

Addition Note
Although this might not be achieved easily due to the fact that the whole structure of the UI tree is very complicated.

[LogServiceManager && NoteBookManagerService][_processQueue()]

Describe the bug
在LogServiceManager里, NoteBookManagerService被成功的实例化了, 但是并不能调用其相关的任何API或者field, 非常奇怪.

以解决问题为先, 暂时创建了一个static field叫做rootPath被LogServiceManager用来代替相关API.

可能, 或许, 跟setInterval()有关?

[macOS][ActionView] Open A Folder Button Does Not Hide

Describe the bug
The Open A Folder button still appears after opening a folder.

To Reproduce
Steps to reproduce the behavior:

  1. Click on Open a folder button to import a folder
  2. Hover the mouse back to the middle of action view screen
  3. Observe how the Open a folder button is still there

Expected behavior
Open a folder button should hide after opening a folder with it

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2021-08-24 at 10 26 19 AM
Screen Shot 2021-08-24 at 10 25 59 AM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[UI][Context Menu] Opening up context menu near the end of screen will extend beyond Main App Container

Describe the bug
RIght clicking the main app container near the end of screen will make the context menu go beyond main app container
To Reproduce
Steps to reproduce the behavior:

  1. Right Click Near the end of the screen

Expected behavior
Either the context menu gets cut off or it find the best position to place it
Screenshots
Screen Shot 2021-08-29 at 6 21 04 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

[macOS][Split View Markdown CodeBlock] Colour Not Consistent When Writing Simplified Chinese Characters Inside of A Markdown CodeBlock

Describe the bug
I switched to the traditional view splitting and used the markdown code block, then I started writing Simplified Chinese inside of it, but the resulting view on the right size displays the text in inconsistent colour.

To Reproduce
Steps to reproduce the behavior:

  1. Turn on traditional view splitting
  2. Insert a markdown code block
  3. Enter some Simplified Chinese Characters
  4. Observe the result

Expected behavior
The colour of the characters should be consistent
Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2021-08-26 at 9 40 29 AM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[UI Tree] use a `TernarySearchTree` instead of `ResourceChangeEvent` for faster refreshing

Describe the bug
When a ResourceChangeEvent happens, we should only refresh the subtree where the corresponding root node is the topmost node that has been affected instead of simply refreshing the whole tree blindly.

To improve this (only applied if the memory cost is considerable), drop off the class ResourceChangeEvent, instead, use a ternary search tree to store all the paths in string form of the current displaying files and directories. The client can check if the changed targets if in the current displaying tree so that we can identify which changed target will be the topmost so that we only refresh starting from there.

[AsyncMultiTree] duplicate render calls (twice) when a tree node is set to expand

Describe the bug
When IndexTreeModel.setCollapsed() to expand, two rerender calls happens inside the function IndexTreeModel.__setCollapsed():
1st - __setTreeNodeCollapsed() -> onDidChangeCollapseState event will fire and AsyncMultiTree will response to it and rerender the tree.
2nd - __updateListNodeCollapsed() -> this._view.splice() and this will rerender the list view (tree) in a second time.

`Sash` dragging moves too slow

The Sash dragging motion does not work fluence as I expect (compares to visual studio code).

Some corner cases I have already excluded:

  • When the renderer process only renders a single Sash object, still moves too slow. So I believe it is not a general performance issue to the whole program.
  • I remove all the dynamic import CSS files, still moves too slow.
  • I used the same main.ts and sash.ts codes in another basic electron program, that program still works perfectly. So I believe it is not an issue from the main process or the Sash implementation.
  • Used the same package.json in that basic electron program, still works. So it is not any version issues.

[Unit Test]mocha command giving ReferenceError: window is not defined

Describe the bug
mocha seems does not to support window global variable after executing the command script npm test.

Error

ReferenceError: window is not defined
    at Object.<anonymous> (D:\dev\ref\electron-play-ground\src\base\common\animation.ts:49:5)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module.m._compile (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1371:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1374:12)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (D:\dev\ref\electron-play-ground\src\base\browser\basic\scrollable\scrollable.ts:1:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module.m._compile (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1371:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1374:12)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (D:\dev\ref\electron-play-ground\test\base\common\scrollable.test.ts:7:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module.m._compile (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1371:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (D:\dev\ref\electron-play-ground\node_modules\ts-node\src\index.ts:1374:12)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.exports.requireOrImport (D:\dev\ref\electron-play-ground\node_modules\mocha\lib\nodejs\esm-utils.js:60:20)
    at async Object.exports.loadFilesAsync (D:\dev\ref\electron-play-ground\node_modules\mocha\lib\nodejs\esm-utils.js:103:20)
    at async singleRun (D:\dev\ref\electron-play-ground\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at async Object.exports.handler (D:\dev\ref\electron-play-ground\node_modules\mocha\lib\cli\run.js:374:5)
npm ERR! Test failed.  See above for more details.

Desktop (please complete the following information):

  • windows 10

[UI][Misposition when dragging `Sash`]

Describe the bug
ActionView Sash dragging may cause a slight misposition.

To Reproduce
Steps to reproduce the behavior:

  1. drag the action view resizer and move a couple of times, you may see a slight misposition happen.

Expected behavior
No misposition.

Screenshots
image

Desktop (please complete the following information):

  • Windows 10

macOS - pasting a long content makes the action bars disappear

Describe the bug
When I paste in multiple images or a large image, the action bar will get pushed up, which makes it disappear.
To Reproduce
Steps to reproduce the behavior:

  1. Paste in a long string of characters or images
  2. Observe how the action bar is invisible

Expected behavior
Action Bar should remain still
Screenshots
Screen Shot 2021-08-22 at 12 26 46 AM
Screen Shot 2021-08-22 at 1 42 27 AM

Additional comments
Not Sure if this is on Windows or Linux

### Common Codes

Common Codes

  • New emitters
  • ...

User interface

  • Scrollable
  • ...

Workbench

  • KeyboardService - basic functionality
  • ShortcutService - basic functionality
  • IpcService - basic functionality

Unit Tests

  • shortcutService related unit tests.
  • Emitters

Originally posted by @Bistard in #69

when actionView is resizing, the editor text can be selected.

Describe the bug
as the titile said.

To Reproduce
Steps to reproduce the behavior:

  • open a file
  • drag the resize button
  • pull down your mouse, then you have a chance to select some texts from the editor

Expected behavior

  • no text is allowed to be selected during this process.

Screenshots
image

[UI][Muti selection when sash is dragging]

Describe the bug
Dragging sash may also selects editor text.

To Reproduce
Steps to reproduce the behavior:

  1. Drags action view resizer a couple of times.

Expected behavior
Dragging action view resizer will not cause any other mouse events.

Desktop (please complete the following information):

  • Windows 10

[AsyncTree] using array instead of object for `IAsyncNode` (results a really bad readability)

Describe the bug
For a small object and array, the object seems to take much more memory than a small array in a V8 engine.

Since IAsyncNode always has three properties. It is considered to use an array to store the node instead of an object.

The biggest challenge is that the readability is terrible. I will keep this issue open and see if there are any other chances to increase readability while using arrays.

[Scrollbar] edge detection

Describe the bug
scrollbar cannot do edge detection properly.

Screenshots
动画

Desktop (please complete the following information):

  • OS and Windows and Linux

[Editor] Tokenizer/lexer refactor

Describe the Feature
Currently, nota's tokenization process is using marked which is a stable open-sourced third-party library that uses RegExp for splitting text into tokens. However, by reading the source code, it still can be improved by serval points:

  • A lot of string splitting/concatenation when creating each new token.
  • Each token stores a copy of the string of that token (Instead, we might use index/offset).
  • Using RegExp might not be the fastest choice.
    We might need to design our own version of tokenizer/lexer to improve these flaws.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.