Skip to content

Commit ea49478

Browse files
razankv13claude
andcommitted
Merge branch 'main' into improve-editor - selective merge
This merge brings in important bug fixes and features from main while preserving all autocomplete/suggestions improvements from improve-editor branch. Changes from main integrated: - Flutter/Dart version upgrade (3.22.2/3.4.3) - Dispose fixes (akvelon#298): Added _disposed flag and mounted checks - UndoHistoryController support (akvelon#302) - Line height in default text style fix (akvelon#297) - YAML support and comments (akvelon#305, akvelon#199) - JS/TS single line comments (akvelon#291) - Paired symbols support (akvelon#192) - Line numbers alignment fix (akvelon#307) - Pull request template - Various dependency updates Changes preserved from improve-editor: - Refactored code_controller structure (directory with helpers) - SQL formatter and suggestions logic - Word insertion helper - Popup positioning improvements - Gutter scrollbar hiding - Browser detection enhancements - All autocomplete/suggestions improvements Conflicts resolved: - code_field.dart: Integrated dispose, undo, and line height fixes - code_controller.dart: Kept refactored structure, added dispose fix - gutter.dart: Kept scrollbar hiding feature - popup.dart & popup_controller.dart: Kept positioning improvements - parser_factory.dart: Added YAML support with package imports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2 parents 7c79d4e + bad3c52 commit ea49478

File tree

31 files changed

+1596
-2
lines changed

31 files changed

+1596
-2
lines changed

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## What type of PR is this?
2+
3+
<!-- Remove all that don't apply -->
4+
5+
- 🍕 Feature
6+
- 🐛 Bug Fix
7+
- 🛠 Enhancement
8+
- 📝 Documentation Update
9+
- 🎨 Style
10+
- 🧑‍💻 Code Refactor
11+
- 🔥 Performance Improvements
12+
- ✅ Test
13+
- 🤖 Build
14+
- 🔁 CICD
15+
- 🧹 Chore
16+
- 📦 Dependency Update
17+
- ⏩ Revert
18+
19+
## Description
20+
21+
<!--
22+
Please do not leave this blank
23+
This PR [adds/removes/fixes/replaces] the [feature/bug/etc].
24+
-->
25+
26+
## Added tests?
27+
28+
- 👍 yes
29+
- 🙅 no, because they aren't needed
30+
- 🙋 no, because I need help
31+
32+
## Added to documentation?
33+
34+
- 🚀 Yes, here: `add link/reference here`
35+
- 🙅 No documentation needed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.3.5
2+
3+
- Fixed line numbers not aligning with lines (https://github.com/akvelon/flutter-code-editor/pull/307)
4+
5+
## 0.3.4
6+
7+
- Added default height to `defaultTextStyle` (https://github.com/akvelon/flutter-code-editor/pull/297).
8+
- Added `disposed` and `mounted` checks to `CodeField` and `CodeController` (https://github.com/akvelon/flutter-code-editor/pull/298).
9+
- Added `UndoHistoryController` to `CodeField` (https://github.com/akvelon/flutter-code-editor/pull/302).
10+
- Added support for `yaml` comments (https://github.com/akvelon/flutter-code-editor/pull/305).
11+
12+
## 0.3.3
13+
14+
- Added `smartDashesType` and `smartQuotesType` to `CodeField` (https://github.com/akvelon/flutter-code-editor/pull/278).
15+
- Added named sections support for JavaScript and TypeScript (https://github.com/akvelon/flutter-code-editor/pull/291).
16+
117
## 0.3.2
218

319
- Flutter 3.22 WASM fixes

example/android/app/build.gradle

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "com.example.example"
27+
defaultConfig {
28+
compileSdk flutter.compileSdkVersion
29+
}
30+
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '1.8'
38+
}
39+
40+
sourceSets {
41+
main.java.srcDirs += 'src/main/kotlin'
42+
}
43+
44+
defaultConfig {
45+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46+
applicationId "com.example.example"
47+
minSdkVersion flutter.minSdkVersion
48+
targetSdkVersion flutter.targetSdkVersion
49+
versionCode flutterVersionCode.toInteger()
50+
versionName flutterVersionName
51+
}
52+
53+
buildTypes {
54+
release {
55+
// TODO: Add your own signing config for the release build.
56+
// Signing with the debug keys for now, so `flutter run --release` works.
57+
signingConfig signingConfigs.debug
58+
}
59+
}
60+
}
61+
62+
flutter {
63+
source '../..'
64+
}
65+
66+
dependencies {}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- Flutter needs it to communicate with the running application
3+
to allow setting breakpoints, to provide hot reload, etc.
4+
-->
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
</manifest>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="example"
4+
android:icon="@mipmap/ic_launcher">
5+
<activity
6+
android:name=".MainActivity"
7+
android:exported="true"
8+
android:launchMode="singleTop"
9+
android:theme="@style/LaunchTheme"
10+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
11+
android:hardwareAccelerated="true"
12+
android:windowSoftInputMode="adjustResize">
13+
<!-- Specifies an Android theme to apply to this Activity as soon as
14+
the Android process has started. This theme is visible to the user
15+
while the Flutter UI initializes. After that, this theme continues
16+
to determine the Window background behind the Flutter UI. -->
17+
<meta-data
18+
android:name="io.flutter.embedding.android.NormalTheme"
19+
android:resource="@style/NormalTheme"
20+
/>
21+
<!-- Displays an Android View that continues showing the launch screen
22+
Drawable until Flutter paints its first frame, then this splash
23+
screen fades out. A splash screen is useful to avoid any visual
24+
gap between the end of Android's launch screen and the painting of
25+
Flutter's first frame. -->
26+
<meta-data
27+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28+
android:resource="@drawable/launch_background"
29+
/>
30+
<intent-filter>
31+
<action android:name="android.intent.action.MAIN"/>
32+
<category android:name="android.intent.category.LAUNCHER"/>
33+
</intent-filter>
34+
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
37+
<meta-data
38+
android:name="flutterEmbedding"
39+
android:value="2" />
40+
</application>
41+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- Flutter needs it to communicate with the running application
3+
to allow setting breakpoints, to provide hot reload, etc.
4+
-->
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
</manifest>

example/android/build.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
buildscript {
2+
ext.kotlin_version = '1.7.10'
3+
repositories {
4+
google()
5+
jcenter()
6+
}
7+
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:8.3.0'
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11+
}
12+
}
13+
14+
allprojects {
15+
repositories {
16+
google()
17+
mavenCentral()
18+
}
19+
}
20+
21+
rootProject.buildDir = '../build'
22+
subprojects {
23+
project.buildDir = "${rootProject.buildDir}/${project.name}"
24+
}
25+
subprojects {
26+
project.evaluationDependsOn(':app')
27+
}
28+
29+
tasks.register("clean", Delete) {
30+
delete rootProject.buildDir
31+
}

example/android/gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true
4+
android.defaults.buildfeatures.buildconfig=true
5+
android.nonTransitiveRClass=false
6+
android.nonFinalResIds=false
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Jun 23 08:50:38 CEST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

example/android/settings.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12+
13+
plugins {
14+
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15+
}
16+
}
17+
18+
plugins {
19+
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
20+
}
21+
22+
include ":app"
23+
24+
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"

0 commit comments

Comments
 (0)