Replies: 2 comments
-
VSCode startup
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
OverView
Folder Structure (2022.10.30)
Iteration Plan
Generals
eval()when using webpack.build.js- A smarter building script that invokes webpack command and integrates with other jobs.createService()- renamed fromcreateDecorator().Common Codes
AsyncRunner- Guarantees no more than N promises are running at the same time.UUID- Universally Unique Identifier.ErrorRegistrant- Brand new error caught system.performance- Functionality that able to test performance on given code section.Blocker- simple but very helpful async tools that user can mually resolve a promise at any time (remove oldAsyncTask).instantiationService- Now supports parent relationship.object.ts- Provides object related helper functions.NodeEventEmitter- A wrapper ofNodeJS.EventEmitterthat listens to the provided channel and wraps the receiving data with the provided data wrapper.PriorityEmitterthat only fires event to the listeners who has the highest priority.Emittermemory leak optimization.uri.ts.User interface (UI)
milkdownlib works.SplitView- Supports nested and vertical SplitView.SplitView- Remove / move / swap APIs.Sash- RefactorSashwhich has smoother movements.SashController- Refactoring to a wrapper class that determines the behaviors of the sash under the user's operations.ListView- Adaptive resizing when window is resizing.Services (common)
ILogService- Remove the old logService code.Logger- Provides the actual logging functionalities.pipelineLogger- Provide integrations on mutiple loggers.pipelineLogger- Intergrated with a buffer to stores loggings inside the logger.fileLoggerService&&fileLogger- Able to create a file logger that does the actual reading / writing logic.consoleLogService&&consoleLogger- A simple log service that only logging to the console (could be either Chrome or Node.js console depends on which env the program is running on).fileService- enum type for representing the error type during different operations.CommandRegistrant&&commandService- A registrant that can register commands universally. A service that can access the registrant in the program.IEnviromentService- A shared environment interface that can be used in either the main process or renderer process (unlike configurations, environment remain constants during runtime).IDiskEnviromentService&&IMainEnviromentService&&IBrowserEnviromentService- Diff environments interfaces for Electron.ILifecycleService&&AbstractLifecycleService- Controls and tracks the lifecycle of the program.DiskStorage- A simple storage class that wraps an object that provides sync functionality.ConfigStorage&&DefaultConfigStorage- A base storage class for configuration usage purpose.ConfigModel- A brand new class (refactored) that integrates with reading / saving.ConfigCollection- A class that contains a collection of config models.AbstractConfigService- Extended byMainConfigServiceandBrowserConfigService.ConfigEmtter- Smarter and cleaver way to listen to the change of configurations.Services (main process)
mainEnvironmentService- A concrete class that stores the environment that is used in the main process of Electron.mainLifecycleService- A concrete class that controls and tracks the lifecycle of the main process of Electron.mainWindowService- Window service has ability to create windows based on different configurations and also tracks the lifecycle of eachWindowInstance.mainStatusService- A simple class that stores the user-specific and window-status related data into the disk synchrously.MainLoggerChannel- A customized wrapper channel class used in the main process so that a logger service can be correctly registered into a server (cannot use ProxyChannel directly).MainFileChannel- A customized file service channel class used in the main process.MainDialogService- A microservice that can open dialog windows under Electron APIs.LookupPaletteService- startup and other few empty html files.MainConfigService- A brand new configuration service (refactored usingConfigCollection).MainHostService- Integrations of a series of functionalities that relates to window as a microservice.Services (renderer process)
browserEnvironmentService- A concrete class that stores the environment that is used in the renderer process of Electron.browserLifecycleService- A concrete class that controls and tracks the lifecycle of the renderer process of Electron.IpcService- Wraps anIpcClient.BrowserLoggerChannel- A customized wrapper channel class used in the renderer process so that a logger service can be correctly registered as a client (cannot use ProxyChannel directly).BrowserFileChannel- A customized file service channel class used in the renderer process.BrowserDialogService- Wrapper overProxyChannel.BrowserConfigService- A brand new configuration service (refactored usingConfigCollection).Main Process
os.tsandapp.tsdeleted).processvariable that cross in different environments.remotemodule from the applications.main.js- The earliest entry of the program. Not responsible for any business logic handling. Only existed for processing some preparation.minilistfor CLI parsing.MainProcess- A new class replacing the oldmainclass. The first entry (exceptmain.js) of the program that only handles core services initialization and make sure there is only one process that is running in the current environment. Does NOT handle the business logic.NotaInstance- A new class that controls the actual business logic of the nota program.WindowInstance- A wrapper class overBrowserWindowthat represents a renderer process of Electron.preload.js(eg. manually wraps and expose desired global variables to renderer process).safeIpcMain- A wrapper of originalIpcMainthat integerates with channel checking.IProtocol- A protocol is a set of rules for formatting and processing data.DataSerializer- Serializes the incoming data intoDataBufferunder the pre-defined protocol.BufferDeserializer- Deserializes the incomingDataBufferinto corresponding data type under the pre-defined protocol.ProxyChannel- A namespace that provide functionalities to proxy micro-services into differentIServerChannelwhich can be directly registered intoIServerBase(You may also to unproxy channel to microservice (notice that the returned object is not the actual microservice, it is aProxy).ChannelClient- Invokes a command or listens to an event from the server channel. Client side can get a promise that resolves with the corresponding response.ChannelServer- Able to register different channels then start to listen to the corresponding possible clients. It will send response back to the client once the work is done by the corresponding channel.ServerBase- Caller can register different server channels into the server. Everytime a client connects to the server. AChannelServeris created and automatically registered all the existed channels into the new server channel.ClientBase- A simple wrapper overChannelClientexcept that it will send a one-time request that including the client ID.IpcServer&&IpcClient- Two implementations overServerBaseandClientBasethat defines the protocol is IPC related.src/code/platform- A brand new directory that contains all the micro-services that may varies in different platforms.registrants- A universalREGISTRANTthat can access all the other registered registrants.Renderer Process
rederer.tsrepacing oldbrowser.ts. The entry of the renderer process.browser.ts. Handles the business logic of each browser in the renderer process.ThemableandThemeServicestartup.Component- refactorComponentUI class with new APIlayout. Furthermore usingFastElementintsead ofHTMLElement.shortcutRegistrant- A type of registrant that used in the renderer process typically for shortcut registration.SplitViewin workbench now.Editor
pieceTable- new methodgetCharCodeByLine.PieceTableModel- wrapper class.EditorModel- tokenization process.EditorViewEventHandler-EditorViewModelEventEmitter-Issues
Sash- Fix When draging the scrollbar of the explorer view, the hover effect on the sash will be activated, which is not what we expected. #100Unit Tests
utility.ts- A series of helper functions / classes only used during unit testing.exist / createFile / createDir / move / copy / delete / warn.shortcutService.test.ts. (currently disabled)async.test.ts- unit tests.diskStorage.test.ts- unit tests.object.test.ts- unit tests.piecetable.test.ts-getCharCodeBylineunit tests.configStorage.test.ts- unit tests.registrant.test.ts- unit tests.commandRegistrant.test.ts- unit tests.configRegistrant.test.ts- unit tests.PieceTableModel- unit tests.Benchmark & Optimization
PieceTable- Reading chunks in 128KB or 64KB instead of 256KB. We need a fully test here.forEach/map/reduceetc functions. Use vanilla coding style.Code Review
CompressedObjectTreeModel.FuzzyScore.CompressibleAsyncDataTree.ThemeServiceworks.StorageServiceworks.TokenizationTextModelPartTextModelTokenizationTokenizationStateStore- Stores the states at the start of each line and keeps track of which lines must be retokenized.ContiguousTokensStore- Represents contiguous tokens in a text model.SparseTokensStore- Represents sparse tokens in a text model.LineTokensgiven a line number) (low-level)CommandServiceCommandRegistryActionandAction2preload.jslifeCycleService.enviromentService.stateService.CodeMainclass.CodeApplicationclass.WindowsMainServiceclass.CodeWindowclass.preload.jsdesktop.main.tsipc.ts⭐ConfigurationModelConfiguration&&DefaultConfigurationModel&&DefaultConfiguration&&UserSettingsRegistry.PieceTableoptimization.Documentation
Nota_Manual- detailed documentation ofNota.Others
TiddlyWikiBeta Was this translation helpful? Give feedback.
All reactions