Skip to content

Commit e3d6d34

Browse files
authored
fix: enable horizontal scrolling for long lines in SQL editor (#499)
1 parent a491476 commit e3d6d34

File tree

153 files changed

+13066
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+13066
-89
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Fixed
1919

2020
- SQL editor not auto-focused on new tab and cursor missing after tab switch
21+
- Long lines not scrollable horizontally in the SQL editor
2122
- SSH profile lost after app restart when iCloud Sync enabled
2223
- MariaDB JSON columns showing as hex dumps instead of JSON text
2324
- MongoDB Atlas TLS certificate verification failure

LocalPackages/CodeEditSourceEditor/Package.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ let package = Package(
1414
)
1515
],
1616
dependencies: [
17-
// A fast, efficient, text view for code.
18-
.package(
19-
url: "https://github.com/CodeEditApp/CodeEditTextView.git",
20-
from: "0.12.1"
21-
),
17+
// A fast, efficient, text view for code (local override).
18+
.package(path: "../CodeEditTextView"),
2219
// tree-sitter languages (local override)
2320
.package(path: "../CodeEditLanguages"),
2421
// CodeEditSymbols

LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StyleViews.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,21 @@ extension TextViewController {
2020
/// Style the text view.
2121
package func styleTextView() {
2222
textView.postsFrameChangedNotifications = true
23-
textView.translatesAutoresizingMaskIntoConstraints = false
23+
if wrapLines {
24+
textView.translatesAutoresizingMaskIntoConstraints = false
25+
} else {
26+
textView.translatesAutoresizingMaskIntoConstraints = true
27+
textView.autoresizingMask = [.height]
28+
textView.updateFrameIfNeeded()
29+
}
2430
}
2531

2632
/// Style the scroll view.
2733
package func styleScrollView() {
2834
scrollView.translatesAutoresizingMaskIntoConstraints = false
2935
scrollView.contentView.postsFrameChangedNotifications = true
3036
scrollView.hasVerticalScroller = true
37+
scrollView.hasHorizontalScroller = !wrapLines
3138
scrollView.scrollerStyle = .overlay
3239
}
3340

47.1 KB
Loading
70 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 🐞 Bug report
2+
description: Something is not working as expected.
3+
title: 🐞 <bug title>
4+
labels: bug
5+
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Description
10+
placeholder: >-
11+
A clear and concise description of what the bug is...
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: To Reproduce
18+
description: >-
19+
Steps to reliably reproduce the behavior.
20+
placeholder: |
21+
1. Go to '...'
22+
2. Click on '....'
23+
3. Scroll down to '....'
24+
4. See error
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
attributes:
30+
label: Expected Behavior
31+
placeholder: >-
32+
A clear and concise description of what you expected to happen...
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
attributes:
38+
label: Version Information
39+
description: >-
40+
click on the version number on the welcome screen
41+
value: |
42+
CodeEditTextView: [e.g. 0.x.y]
43+
macOS: [e.g. 13.2.1]
44+
Xcode: [e.g. 14.2]
45+
46+
- type: textarea
47+
attributes:
48+
label: Additional Context
49+
placeholder: >-
50+
Any other context or considerations about the bug...
51+
52+
- type: textarea
53+
attributes:
54+
label: Screenshots
55+
placeholder: >-
56+
If applicable, please provide relevant screenshots or screen recordings...
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ✨ Feature request
2+
description: Suggest an idea for this project
3+
title: ✨ <feature title>
4+
labels: enhancement
5+
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Description
10+
placeholder: >-
11+
A clear and concise description of what you would like to happen...
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Alternatives Considered
18+
placeholder: >-
19+
Any alternative solutions or features you've considered...
20+
21+
- type: textarea
22+
attributes:
23+
label: Additional Context
24+
placeholder: >-
25+
Any other context or considerations about the feature request...
26+
27+
- type: textarea
28+
attributes:
29+
label: Screenshots
30+
placeholder: >-
31+
If applicable, please provide relevant screenshots or screen recordings...
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. -->
2+
3+
### Description
4+
5+
<!--- REQUIRED: Describe what changed in detail -->
6+
7+
### Related Issues
8+
9+
<!--- REQUIRED: Tag all related issues (e.g. * #123) -->
10+
<!--- If this PR resolves the issue please specify (e.g. * closes #123) -->
11+
<!--- If this PR addresses multiple issues, these issues must be related to one other -->
12+
13+
* #ISSUE_NUMBER
14+
15+
### Checklist
16+
17+
<!--- Add things that are not yet implemented above -->
18+
19+
- [ ] 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)
20+
- [ ] The issues this PR addresses are related to each other
21+
- [ ] My changes generate no new warnings
22+
- [ ] My code builds and runs on my machine
23+
- [ ] My changes are all related to the related issue above
24+
- [ ] I documented my code
25+
26+
### Screenshots
27+
28+
<!--- REQUIRED: if issue is UI related -->
29+
30+
<!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
export LC_CTYPE=en_US.UTF-8
4+
5+
set -o pipefail && xcodebuild clean docbuild -scheme CodeEditTextView \
6+
-destination generic/platform=macos \
7+
-skipPackagePluginValidation \
8+
OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path CodeEditTextView --output-path ./docs" | xcpretty
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
ARCH=""
4+
5+
if [ $1 = "arm" ]
6+
then
7+
ARCH="arm64"
8+
else
9+
ARCH="x86_64"
10+
fi
11+
12+
echo "Building with arch: ${ARCH}"
13+
14+
export LC_CTYPE=en_US.UTF-8
15+
16+
set -o pipefail && arch -"${ARCH}" xcodebuild \
17+
-scheme CodeEditTextView \
18+
-derivedDataPath ".build" \
19+
-destination "platform=macOS,arch=${ARCH},name=My Mac" \
20+
-skipPackagePluginValidation \
21+
clean test | xcpretty

0 commit comments

Comments
 (0)