Git Product home page Git Product logo

nucleus's Introduction

The name's Mellobacon, a nerd trying to make cool stuff.

  • ๐ŸŒŽ I am from the USA ๐Ÿค 

  • ๐Ÿ‘ฉโ€๐ŸŽ“ I am currently a university student, Senior (or fourth year in uni for you international peeps xd)

  • ๐ŸŽ“ Iโ€™m currently learning C#, Tauri, and JavaScript/TypeScript

  • ๐Ÿ”ฅ Iโ€™m currently working on Nucleus, a text editor

  • ๐Ÿ–ฅ๏ธ Extra: Check out other cool project I did!

  • Looking for a project to contribute on? Help is wanted!


My Skill Set

Here's a little summary of what I know

Languages


  • HTML5
  • CSS
  • SCSS
  • JavaScript
  • TypeScript
  • C#
  • Java
  • Python

Frameworks


  • .NET
  • Bootstrap
  • Svelte
  • Electron
  • Tauri

Github Stats

nucleus's People

Contributors

billyeatcookies avatar dependabot[bot] avatar frankschmitt avatar ish-u avatar mellobacon avatar suraj-bhandarkar-s 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nucleus's Issues

[FEATURE] The file tree shouldnt have anything in it if there is no workspace loaded

Is your feature request related to a problem? Please describe.
Basically what the title says. This is confusing to users.

Describe the solution you'd like
The file tree should indicate that there is no workspace/folder open instead of the placeholder tree

Additional context
Deleting the data and just having it be an empty array should work I think

let testtree = [
{id: 0, name:"Empty", path:"testpath/"},
{id: 1, name:"Dir1", children: [
{id: 2, name:"File1", path: "/file1.path"},
{id: 3, name:"File2.txt", path:"testpath/file2.txt"},
], path: "testpath/Dir1/"},
];

[BUG] Error thrown on file drop

Describe the bug
When dragging a file/folder in the file tree to another directory, access is denied gets thrown

To Reproduce
Steps to reproduce the behavior:

  1. Open a directory
  2. Try to drag a file/folder to another directory in the tree
  3. Open dev tools
  4. See error in console

Expected behavior
Files/folders should be able to be moved on drag and drop

Desktop (please complete the following information):

  • OS: Windows

Additional context
Refer to this commit.

[BUG] If any menus are open, hovering should switch menus

Describe the bug
when a menu is open, hovering over other menus should switch the active menu

To Reproduce

nucleus_GR7VgoBFGG.mov

Expected behavior
The expected behavior is shown as an example from vscode below

Code_i35by1WuTT.mp4

Desktop (please complete the following information):

  • OS: windows 10
  • Version 22H2

[FEATURE] Communicate long proccesses to the user

Is your feature request related to a problem? Please describe.
When waiting for a long process to complete, like loading a large directory or file, there is no way to tell that it is loading

Describe the solution you'd like
A loading bar or something to show that the process is indeed running.

[FEATURE] Logging

Is your feature request related to a problem? Please describe.
There is currently no longing implemented in the app.

Describe the solution you'd like
Add logging.

[BUG] Window shrinks instead of going fullscreen when un-maximized

Describe the bug
When you un-maximize and then try to fullscreen an instance that is already fullscreen, the window shrinks instead of going fullscreen.

To Reproduce
Steps to reproduce the behavior:

  1. Go fullscreen with F11
  2. Un-maximize with the titlebar button
  3. Now try to go fullscreen again
  4. Window doesn't go fullscreen, but shrinks

Expected behavior
Window was supposed to fullscreen again.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 22H2

[FEATURE] Mac Support

Is your feature request related to a problem? Please describe.
I would like to use Nucleus on my Mac but it only runs on Windows :(.

Describe the solution you'd like
Mac Support and the ability to run the application through a Macos executable bundle (.app)

[Updating README.md file ]

Is your feature request related to a problem? Please describe.
I want to add How to contribute section, as it will be helpful for beginners and also adding contributors profiles with it.

@mellobacon if you want it, then assign me.

[BUG] Tabs don't have names

Describe the bug
Tabs do not have any names

To Reproduce
Steps to reproduce the behavior:

  1. Open a tab
  2. The tab won't have a name

Expected behavior
The tab should have a name

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 22.04

Additional context
Everything else about tabs work

[FEATURE] System Shortcut Bindings

Is your feature request related to a problem? Please describe.
In an attempt to add shortcuts for copy/paste/cut/undo/redo/delete I had disabled the system functions and attempted to make my own so that the functions can be bounded to other key combinations as the user wishes.
Right now it is not ideal and so using these functions through the edit menu or triggering them through a custom key combination isn't possible.

Also, disabling system functions isn't a good idea anyways.

Describe the solution you'd like
When you press a button in the edit menu, paste for example, it should paste whatever content in the users clipboard into the editor area or any input field that is focused. This should also happen if you have a custom key combination. The default system shortcut should also still work.

Ideally what I need is a way to trigger these system input functions so that they can work via pressing a button or using a custom key combination.

Additional context
For context this was my solution to making my own functions for the editor area. This isn't a great solution, its very messy, and is only local to the editor area, not other input fields. This code will probably be deleted once the solution is found but it shows what I was going for.

export async function append(value: string) {
let cursorpos = getCurrentEditor().getView().state.selection.main.head + value.length;
const lines = value.split("\n").length - 1;
if (lines > 0) {
cursorpos -= lines;
}
getCurrentEditor().getView().dispatch({
changes: {
from: getCurrentEditor().getView().state.selection.ranges[0].from,
to: getCurrentEditor().getView().state.selection.ranges[0].to,
insert: value,
},
selection: {anchor: cursorpos, head: cursorpos},
scrollIntoView: true
})
await getCurrentEditor().updateContent();
getCurrentEditor().updateLineInfo();
}
export async function copy() {
const selection = getCurrentEditor().getView().state.sliceDoc(getCurrentEditor().getView().state.selection.main.from, getCurrentEditor().getView().state.selection.main.to)
await navigator.clipboard.writeText(selection);
}
export async function cut() {
deleteToLineEnd(getCurrentEditor().getView())
await getCurrentEditor().updateContent();
getCurrentEditor().updateLineInfo();
}
export async function undoChange() {
undo(getCurrentEditor().getView());
await getCurrentEditor().updateContent();
getCurrentEditor().updateLineInfo();
}
export async function redoChange() {
redo(getCurrentEditor().getView());
await getCurrentEditor().updateContent();
getCurrentEditor().updateLineInfo();
}
export async function deleteChars() {
deleteCharForward(getCurrentEditor().getView());
await getCurrentEditor().updateContent();
getCurrentEditor().updateLineInfo();
}

I'm not sure how possible it is to access copy/paste/cut/undo/redo/delete through the browser or in rust but I assume there is a way since VSCode seems to have figured it out.

[FEATURE] Settings

Is your feature request related to a problem? Please describe.
Nucleus currently doesn't have a local settings system for customizing the editor

Describe the solution you'd like
A settings file the user can save to and write into to customize the editor.

Additional context
The basics should be

  • Editor font size/font family
  • Autosave toggle
  • Editor theme (light/dark)

[BUG] File should be highlighted in file explorer

Describe the bug
When you open a file or folder in the file explorer, its not highlighted, so its not obvious where it is.

To Reproduce
Steps to reproduce the behavior:

  1. Open a folder or file
  2. Right click on a file/folder in the file tree or open tab and click Open In Explorer
  3. Once the file explorer shows up, it should open in the location the file is in, but it wont be highlighted in there

Expected behavior
After opening in the os file explorer, the file or folder should be highlighted so you don't have to go looking for it

[BUG] Tabs don't reorder

Describe the bug
Tabs need to be able to be reordered. Currently that is attempting to be done via the sortable.js library, but it does not work for some reason. There are no errors.

Code being written here:

onMount(() => {
Sortable.create(tabcontainer, {
draggable: ".tab",
animation: 150,
easing: "cubic-bezier(1, 0, 0, 1)",
sort: true
})
})

[FEATURE] Add undo/redo in the file tree

Is your feature request related to a problem? Please describe.
There is currently not a way to undo/redo file actions in the file tree.

Describe the solution you'd like
Add a way to undo/redo file actions when focused on the file tree.

[FEATURE] Syntax Highlighting Themes

Is your feature request related to a problem? Please describe.
The current code theme isn't too good

Describe the solution you'd like
There should be an improvement on that one or better yet a small list of themes to start with.

Additional context
There is a neat website for making a basic theme (here) for CodeMirror as well as some premade ones here via https://github.com/FarhadG/code-mirror-themes. Making a custom one though would be nice for later.

[FEATURE] Feedback on opening unsupported files

Is your feature request related to a problem? Please describe.
When you try to open an image or other file that is non UTF-8, it doesn't open.

Describe the solution you'd like
Instead of there being no feedback besides an error thrown in the console, there should be a way to communicate to the user that the file cannot be read. Maybe have a tab open with text explaining so or something? It could be like vscode...but there could be other alternatives like a notification or something.

[BUG] Font family settings are only applied to currently open editors

Describe the bug
Font family settings are only applied to currently open editors, newly opened doesn't use the modified settings to configure font family.

To Reproduce
Steps to reproduce the behavior:

  1. Open some editors
  2. Open settings
  3. Change font family
  4. Notice the font family change for opened editors
  5. Open few more editors
  6. Notice the font family is still the default

Expected behavior
The font family for newly opened was supposed to be according to the modified settings.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 22H2

[FEATURE] Save files as temp

Is your feature request related to a problem? Please describe.
File content gets lost after a crash

Describe the solution you'd like
Files should be saved temporarily somewhere when editing. Then after a crash there should be a way to recover the file

[FEATURE] Syntax Highlighting

Is your feature request related to a problem? Please describe.
Currently there is no syntax highlighting for files.

Describe the solution you'd like
There should be syntax highlighting for most supported languages if possible.

Additional context
CodeMirror has a way to support this but if it's many languages then it can be tedious since it imports highlighting for a language one at a time (see here for more info). I might have a way to get around the many imports required for each language by using a json object for each one instead but will have to test.

[FEATURE] Internal Terminal Support

Is your feature request related to a problem? Please describe.
Currently I am focused on adding external terminal support while I did research on how to make it internal. An external terminal seems fine for the time being but eventually an internal editor will be done instead

Describe the solution you'd like
Add internal terminal support to replace the external terminal feature. This will be as a panel below the editor

Additional context
After some research, this can be done via xterm + nodepty. The xterm code has been in place for a bit so all is needed is to add nodepty once panels are implemented.

[BUG] Filetree should keep collapsed/expanded state of folders on reopen

Describe the bug
Right now, if you expand a folder, and then close and reopen the file tree, the folders will be collapsed again.

To Reproduce
Steps to reproduce the behavior:

  1. Open a folder
  2. Expand a folder
  3. Close the file tree
  4. Reopen the file tree

Expected behavior
It should be able to keep the state of folders (whether its expanded or collapsed) when you close and reopen it.

[MISC] Make a build script

Trying to get Nucleus set up on Linux and Windows is a pain if you have none of the requirements dear lord

The build script will make sure the requirements for the package manager and required languages are installed.
For Windows I know this is mostly point and click but there are some cases where it might be helpful to have one (such as letting the user use any package manager like npm, npx, yarn, whatever).
For Linux this will be very useful since the commands required will all be in one script.

Preferably this should be shell script for Linux and a batch script for Windows.

[FEATURE] Directory Watcher for the file tree

Is your feature request related to a problem? Please describe.
Currently the file tree doesn't update when you files outside the editor like in the file explorer. Though there is a refresh button to click on, its sort of inconvenient.

Describe the solution you'd like
There should be a way to make a directory watcher in which once you open a folder, any changes, outside the editor or in, would be reflected in the file tree automatically (preferably in Rust).

Additional context
An issue I've found with this is either because of my limited Rust experience or asynchronous code everywhere, making the directory watcher leads to an infinite loop since I haven't found a way to run this in the background. I think this is something where it'll need to run in a different thread or something. Assistance with this is appreciated.

[BUG] Menu name and top title are selectable

Describe the bug
Menu titles can be selected as normal text

To Reproduce
Steps to reproduce the behavior:

  1. Click in the editor
  2. Drag over the menus and the title at the top
  3. See the menu menus and the title are selected

Expected behavior
Menu names and title should not be selectable

Screenshots

SelectedMenus

Desktop (please complete the following information):

  • OS: macOS
  • Version 10.15.7

[BUG] "yarn tauri dev" fails on Linux due to missing winreg crate

Describe the bug
When trying to run yarn tauri dev on Ubuntu 20.04, it bails out with this error message:

error: failed to run custom build command for winreg v0.10.1

Caused by:
process didn't exit successfully: /home/frank/src/3rd_party/Nucleus/src-tauri/target/debug/build/winreg-28dd1c04da324445/build-script-build (exit status: 1)
--- stderr
error: winreg is only supported on Windows platforms
help: if your application is multi-platform, use [target.'cfg(windows)'.dependencies] winreg = "..."
help: if your application is only supported on Windows, use --target x86_64-pc-windows-gnu or some other windows platform

To Reproduce

  • clone the repo on Linux (I'm using Ubuntu 20.04 LTS)
  • run yarn tauri dev

Expected behavior
Development mode should start without errors

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 20.04.5 LTS

Additional context
Add any other context about the problem here.

[BUG] Encoding BOM is incorrectly loaded as text

Describe the bug
Encoding BOM (byte order mark) is incorrectly loaded as text at the start of the file.

To Reproduce
Steps to reproduce the behavior:

  1. Open any file which contains a BOM

Expected behavior
The BOM should be treated as an encoding mark (Unicode magic number), and not displayed as part of the front end.

Screenshots
nucleus_sxDCRkPWgP

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 22H2 (22621.1848)

Additional context
Since an encoding BOM is not intended to be printable characters, Nucleus does an alright job at showing a red dot in its stead. However, the correct thing to do is to not display it at all and treat it as the BOM it's supposed to be.

[FEATURE] Add ability to make new files

Is your feature request related to a problem? Please describe.
Right now the editor can only edit files that already exist.

Describe the solution you'd like
The editor should be able to make a new file the user can edit and save (preferably manually since everything auto-saves currently)

[FEATURE] Themes

Is your feature request related to a problem? Please describe.
Editor themes

Describe the solution you'd like
Just for a start have a dark and a light theme

Additional context
This feature is already being worked on but is going to be postponed temporarily. Most likely it will work via JSON files instead of different stylesheets

[FEATURE] External terminal support

Is your feature request related to a problem? Please describe.
You are able to open a new terminal window from the editor. The way its done is spawning a new terminal based on a command, but that command depends on the OS.

Describe the solution you'd like
Different Linux distros has different commands for opening a terminal. Like konsole, gnome-terminal, etc. Since there is no automated way to check, it'll need to be done manually.

Additional context
This is how the code for opening a terminal works. As you can see right now it supports opening the Windows Terminal on Windows, and then support for opening the terminal on ubuntu/debian distros. What's needed is to basically have a list of known commands for opening the terminal on popular distros so that it's not limited to just one. There will also need to be a terminal command for MacOs.

fn open_terminal(path: &str) {
if env::consts::OS == "windows" {
// programs for windows: [cmd, powershell, wt]
// programs for ubuntu: [gnome-terminal]
// .args(["/C", "start", "wt"])
Command::new("cmd")
.args(["/C", "wt", "-d", path])
.spawn()
.unwrap();
}
else {
Command::new("gnome-terminal")
.arg(format!("--working-directory={}", path).as_str())
.spawn()
.unwrap();
}
}

[BUG] Menu name and top title are selectable

Describe the bug
Menu titles can be selected as normal text

To Reproduce
Steps to reproduce the behavior:

  1. Click in the editor
  2. Drag over the menus and the title at the top
  3. See the menu menus and the title are selected

Expected behavior
Menu names and title should not be selectable

Screenshots

SelectedMenus

Desktop (please complete the following information):

  • OS: macOS
  • Version 10.15.7

[BUG] Line numbers should update instantaneously on drag

Describe the bug
Line numbers should update instantaneously when dragged along the text. Currently, it updates only when the drag stops.

msedge_a0soTSa1yf.mp4

Expected behavior
Expected behavior (from vscode)

msedge_ug7yLKRbBV.mp4

Desktop (please complete the following information):

  • OS: windows 10
  • Version 22H2

[FEATURE] Shortcuts

Is your feature request related to a problem? Please describe.
There are no working shortcuts except for the default document ones (copy, paste etc)

Describe the solution you'd like
Add shortcuts for each menu item in the header and context menus where applicable

Additional context
Tauri has an api called global shortcuts. This works but the issue is because its global it works even when the window is minimized and also blocks shortcuts for other apps. Need to find a workaround for this or a custom implementation

[FEATURE] Support For Extension

What you are doing is already great
but
if you can figure out how to run vs code extension in nucleus.
i know Its not a easy thing
you need to change whole core architecture of this project to support those feature.
For this
you need to understand Vscode codebase
Vscode Github

If you can Figure out that somehow Then you can Make a ultimate code editor .......

[BUG] Context menu bugs out file tree

Describe the bug
After right clicking a file that is open you aren't able to open another file from the file tree

To Reproduce
Steps to reproduce the behavior:

  1. Open a file, any file
  2. Right click on another file
  3. Then double left click on that second file to open it, disregarding the context menu
  4. You can no longer open that second file

Expected behavior
Should be able to open the other file

Screenshots

nucleus_kk3XwvbxqP.mp4

Desktop (please complete the following information):

  • OS: Windows

Additional context
Known workaround: Collapse the file's parent folder, expand it again, now you can open the file or collapse the sidebar and open it again

[BUG] Fullscreen while maximized causes window to not resize correctly

Describe the bug
When the app is maximized and you attempt to go fullscreen, the windows taskbar disappears as it should, but the window does not extend fully and leaves a black border/blue bar around the window

To Reproduce
Steps to reproduce the behavior:

  1. Maximize the window
  2. Press F11 or press the fullscreen button in View > Fullscreen
  3. See error

Expected behavior
The window should go to fullscreen correctly. Fully extended across the window, no weird artifacts.

Screenshots
image
image
Desktop (please complete the following information):

  • OS: Windows

Additional context
While the window is not maximized, making the window go fullscreen works just fine. If the window is using a native titlebar (Nucleus uses a custom titlebar via css), fullscreen works whether the app is maximized or not, as expected.

[BUG] Close tab icon bounds are unclear

Describe the bug
Sometimes, clicking the close tab button does nothing. Hovering over a specific area of the icon shows the "Close tab" tooltip and the X icon darkens, which leads me to believe my cursor is in bounds, but then left clicking does nothing. Feedback is presented (the colour changes briefly), but the tab does not close. Interestingly, left clicking again does close it.

nucleus_ouEivBzXZg.mp4

To Reproduce
See video above.

Expected behavior
A distinct background colour should be applied on hover, making it immediately apparent where the bounds of the button lie.
Example from VS Code:
Code_mLJZCwWTI2

Screenshots
See above

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 22H2 (22621.1848)

Additional context
n/a

[FEATURE] Add Contributing guidelines

Is your feature request related to a problem? Please describe.
Currently when a contributor wants to set the project up and get the editor up and running, there are no guidelines provided. Would be nice to have instructions on setting the editor and workspace up, opening prs and issues, etc.

Describe the solution you'd like
Add guidelines for contributors. Setting up the workspace and building the project, opening prs and issues, etc.

[FEATURE] Multiple Encoding Support

Is your feature request related to a problem? Please describe.
Right now only UTF-8 encodings are supported in Nucleus. This limits what files can be open if the file is not UTF-8.

Describe the solution you'd like
Support other encodings. Preferably just open files as UTF-8 by default (assuming no BOM is present) and then have an option for the user to choose to save the file as another encoding. This should be done in Rust.

Additional context
Rust has a crate called encodings_rs that can be used to encode text to other encodings. Converting from UTF-8 to UTF-16 using encoding_rs isn't the expected behavior (see https://docs.rs/encoding_rs/latest/encoding_rs/static.UTF_16BE.html), so this might have to be done manually. Otherwise I believe converting to and from the other encodings should be fine.

[BUG] Can no longer type in the editor

Describe the bug
Nothing happens when you try to type in the editor

To Reproduce
Steps to reproduce the behavior:

  1. Open the editor
  2. Try to type in it

Expected behavior
Typing in the editor should add what you type

Desktop (please complete the following information):

  • OS: Ubuntu 22.04

Additional context
Typing worked in previous versions

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.