-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
✨ Custom implementation of Sidebar #123
Comments
Would like to contribute. How can i help? |
As far as I know, @lukepistrol hasn't started on this yet. You are welcome to start working on this. If you have any questions, feel free to jump on our discord. The link is in CONTRIBUTING.md. |
Done! |
Yes help is very much appreciated! Open a |
|
I think a parent directory would be nice but we would need to update our data model for this. For now I'll implement the list group header. |
### Description <!--- REQUIRED: Describe what changed in detail --> The issue is described in detail in #1684. ~I tried to resolve a related issue, #1696, but it was harder than I anticipated since the state of the Utility Area is stored separate to the other panes for some reason. Any ideas to resolve this slight issue would be welcome :)~ **EDIT:** I think I fixed it! ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * #123) --> <!--- If this PR resolves the issue please specify (e.g. * closes #123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * Closes #1684 * Closes #1696 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> https://github.com/CodeEditApp/CodeEdit/assets/65467530/166d9b35-ede1-47b8-8814-cf1cbb1a61f2
# Description Adds `useThemeBackground` to `CodeEditTextView` which dictates whether the background of `CodeEditTextView` is clear or uses the given theme background color # Related * CodeEditApp#1004
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description 1. Add 20 pixels of inset to the left of the ruler and 8 pixels of inset to the right of the ruler. I tried to match it as close as possible to Xcode. 2. Set the background color of the highlight ruler line to the same color as the highlighted line in the textView. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * closes CodeEditApp#156 * closes CodeEditApp#128 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> <img width="765" alt="Screenshot 2023-03-16 at 19 05 59" src="https://user-images.githubusercontent.com/82230675/225717006-40530a7b-7864-404b-8d14-5307f6f83bdb.png"> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
…ont and ruler Inset scale with text font size. (CodeEditApp#170) <!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description This PR adds a customized SF Pro Font which aims to look like the Xcode Digits font. The ruler font and the ruler insets scale with the text font size. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * closes CodeEditApp#58 * closes CodeEditApp#157 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> PointSize 13: Xcode left, CodeEdit Right: <img width="73" alt="image" src="https://user-images.githubusercontent.com/82230675/227798735-1041b4a0-7aa9-4e3e-8c73-a8993427e862.png"> PointSize 20: Xcode left, CodeEdit Right: <img width="162" alt="image" src="https://user-images.githubusercontent.com/82230675/227799017-87c08fb7-bac5-4a63-8fb2-b0bf4b0f3f0b.png"> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily --> --------- Co-authored-by: Lukas Pistrol <l.pistrol@gmail.com>
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description > This is a near clone of CodeEditApp#147, but git got messed up on that branch. This PR improves that branch anyways. This enables configuration of the behavior when the tab key is pressed. Previously all tabs were converted to spaces and inserted `tabWidth` spaces in place of the tab character. This PR clarifies that the `tabWidth` parameter should be used for the *visual* width of tabs, and adds an `indentOption` parameter that specifies how to handle inserting tab characters. Adds an `IndentOption` enum with two cases for this behavior: - `spaces(count: Int)` - `tab` If `spaces(count: Int)` is specified, the editor will insert the given number of spaces when the tab key is pressed, otherwise the tab character will be kept. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * CodeEditApp#80 - Does not close, needs an additional PR for the tab width setting. ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots https://user-images.githubusercontent.com/35942988/228014785-85a20e2e-0465-4767-9d53-b97b4df2e11e.mov
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description This PR adds the tab stops implementation. It was previously thought to not function as expected but after comparing to other editors this is the correct implementation. Adding tab stops makes it so tabs stop at intervals along the document, so a tab will not act like a space but rather a break in the line until the next tab stop. Like so: ``` Raw: |\t1\t2\t3 Visual:|----1---2---3 Raw: |\tabc\t2\t3 Visual:|----abc-2---3 ``` ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * Closes CodeEditApp#80 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Screen recording shows the width being updated in real time using a placeholder preference, as well as editing a line with tabs showing the tab stops go backwards only when needed. https://user-images.githubusercontent.com/35942988/229870857-2cb2e40b-4c61-43ce-96c7-f79a8514cfbd.mov <!--- REQUIRED: if issue is UI related --> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description <!--- REQUIRED: Describe what changed in detail --> This change adds all positive edits to the visible range. The assumption is that any edits the user may make are going to be visible at some point in time. If the cursor is not already on the page, it will be scrolled to and if it extends beyond the viewport it will be scrolled to be visible as well. In both of those cases the added range will be overridden immediately due to the scroll. So this fixes the case where characters are being inserted at the end of a file, but aren't being scrolled to. This is apparent in the attached screen recordings. Alternatives considered: - **Re-calculating the visible set:** Decided against due to the extra work that would need to be done potentially every keystroke to calculate a new visible range. - **Update the visible set only if the edit is actually visible:** Decided against due to the reasons previously mentioned. Any edit will eventually be included in the visible set if it is not already in it when the edit occurs. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * closes CodeEditApp#142 * Maybe related to CodeEditApp#162 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Before fix. Edits applied to the end of the file are never sent to tree-sitter for highlighting as they are out of the range of the visible set. They are only updated when the document is scrolled and `visibleSet` is recalculated. https://user-images.githubusercontent.com/35942988/229874599-e2714b72-d51f-4748-89e1-b80ee51bddda.mov After fix. Edits with positive deltas are always included in the `visibleSet`. https://user-images.githubusercontent.com/35942988/229875515-36e96921-71c0-48aa-a62c-75cbd91c52fb.mov <!--- REQUIRED: if issue is UI related --> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description Fixes a bug found found by @cengelbart39 [on discord](https://canary.discord.com/channels/951544472238444645/952640521812193411/1104143145765187644) where a parser would consume ranges already consumed by injected languages. This caused the injected ranges to be realized as plain text, when they should have been kept as their injected language's highlights. This should have been avoided by the call to `query.setRange(range)` on line [43 in TreeSitterClient+Highlight.swift](https://github.com/CodeEditApp/CodeEditTextView/blob/045bd359ef9c4addf2a5bf51e22ba660d69c5d10/Sources/CodeEditTextView/TreeSitter/TreeSitterClient%2BHighlight.swift#L44) but it was found that for some reason in the case found by @cengelbart39 it just didn't work. To fix, an additional check was added in `highlightsFromCursor` to only take any ranges that have indices in the intersection of it's range and the included range. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * See discord link. ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Before: https://user-images.githubusercontent.com/35942988/236696171-d30dfd7b-8545-4396-8aa8-490ceac65551.mov After: https://user-images.githubusercontent.com/35942988/236697575-3f605c0d-3dda-45c2-8f69-0f41148f1c2d.mov
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description Adds a minimum ruler width equal to 4 digits wide to reduce layout shift while scrolling. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * N/A, discussed a couple times in discord. ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Previous: <img width="356" alt="Screenshot 2023-07-11 at 12 28 26 PM" src="https://github.com/CodeEditApp/CodeEditTextView/assets/35942988/469044fa-189f-41d8-83ca-367f2244fe82"> Now: <img width="321" alt="Screenshot 2023-07-11 at 12 27 51 PM" src="https://github.com/CodeEditApp/CodeEditTextView/assets/35942988/547dcdda-f50e-4be6-a065-7fef5b6e7cd7">
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description Makes JSDocs highlight as comments. Because they're injected as a different language they don't get captured normally. This is the only language we have to handle this in so it's hard-coded in the TreeSitterClient. Also adds a quick check to prevent potential recursive cursor notifications using SwiftUI. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * [Discord conversation](https://canary.discord.com/channels/951544472238444645/987416899816149024/1201620579590090853) ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <img width="285" alt="Screenshot 2024-02-02 at 7 37 19 PM" src="https://github.com/CodeEditApp/CodeEditSourceEditor/assets/35942988/f201e5ff-1bf9-4bb5-97fb-0914aa66246a">
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description Finishes the required changes to make [CodeEditTextView#14](CodeEditApp/CodeEditTextView#14) work in CESE, once those changes are merged with a package update. Removes the first responder acquisition when updating cursors, the text view should handle focus state and does so correctly on the main branch. Also fixes a small ordering bug with a check variable related to this issue. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * CodeEditTextView issue, no issues created here. ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots N/A
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description <!--- REQUIRED: Describe what changed in detail --> Tags in HTML, JS, TS, JSX, and TSX are now autocompleted. When you type `<div>` for example, the closing tag `</div>` will be autocompleted. If you press enter, you will be put on a new line in between the opening and closing and that new line will be indented. All tag attributes are ignored in the closing tag. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * closes CodeEditApp#244 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> https://github.com/CodeEditApp/CodeEditSourceEditor/assets/118622417/cf9ffe27-7592-49d5-bee8-edacdd6ab5f4 <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
…#261) <!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description This PR lets you highlight multiple lines and comment them all out at once. ### Related Issues * closes CodeEditApp#253 <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots https://github.com/user-attachments/assets/97ae52d5-0fb0-4b25-90e6-2bbc18769856 <!--- REQUIRED: if issue is UI related --> <!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
In order to make the sidebar more adaptable and customizable we probably need to implement a completely custom one.
The target is to move away from using
NavigationLink
to display theCodeFileView
Steps that need to be taken:
Module
toCodeEditModules
CodeFileView
toWorkspaceView
and display ifworkspace.selectedId
is set.WorkspaceView
add a new SidebarView in aHStack
with theCodeFileView
.workspace.selectedId
. ( 🐞 Sidebar selection not changing in circumstances #137 )The text was updated successfully, but these errors were encountered: