Skip to content

Commit

Permalink
feat: add github settings
Browse files Browse the repository at this point in the history
  • Loading branch information
asjqkkkk committed Jun 21, 2024
1 parent 65e7c78 commit 55bd012
Show file tree
Hide file tree
Showing 12 changed files with 586 additions and 25 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment(please complete the following information):**
Please use `flutter doctor -v` to show your flutter environment, and add your `markdown_widget` version too

**Platform**
Does the problem appear on the **Web** or on the **Mobile**

**Source data**
Please provide a minimal source data that can help locating the problem
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
105 changes: 105 additions & 0 deletions .github/workflows/build_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build & Deploy

on:
push:
tags:
- 'v*'

jobs:
build-and-release-linux:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
flutter-version: '3.16.5'
- name: Install dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Enable linux build
run: flutter config --enable-linux-desktop
- name: Build artifacts
run: flutter build linux --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: crayon-${{github.ref_name}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Linux Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
with:
files: build/linux/x64/release/bundle/crayon-${{github.ref_name}}-linux.zip

build-and-release-windows:
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
flutter-version: '3.16.5'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Enable windows build
run: flutter config --enable-windows-desktop
- name: Build artifacts
run: flutter build windows --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: crayon-${{github.ref_name}}-windows.zip
directory: build/windows/runner/Release
- name: Windows Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
with:
files: build/windows/runner/Release/crayon-${{github.ref_name}}-windows.zip

build-and-release-macos:
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
flutter-version: '3.16.5'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Enable macOS build
run: flutter config --enable-macos-desktop
- name: Build artifacts
run: flutter build macos --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: crayon-${{github.ref_name}}-macos.zip
directory: build/macos/Build/Products/Release
- name: macOS Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
with:
files: build/macos/Build/Products/Release/crayon-${{github.ref_name}}-macos.zip
61 changes: 61 additions & 0 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build & Deploy Web

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.16.5'


- name: Get dependencies
run: flutter pub get

- name: Test project
run: flutter test

- name: Build release project
run: flutter build web

- name: Show dir
run: ls

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: build/web

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: build/web

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACTION_TOKEN }}
publish_dir: build/web
23 changes: 23 additions & 0 deletions .github/workflows/coverage_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test Coveralls

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.16.5'
- run: flutter pub get
- run: flutter packages pub run build_runner build
- run: flutter test --coverage ./test/
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov.info
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Languages : [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md)

[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main)

![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da)

## 当前支持功能
Expand All @@ -30,6 +32,7 @@ Languages : [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md)

## 未来计划

- v0.8.0 支持图片
- v0.7.0 支持图片
- v0.8.0 完善从外部复制内容到编辑器的转换,与从编辑器复制内容到外部的转换
- v0.9.0 核心单元测试补全,高级别bug修复
- v1.0.0 支持移动端
9 changes: 6 additions & 3 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ A rich text editor implemented based on Flutter.

Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md)

[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main)

![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da)

## Current supported features
Expand All @@ -30,6 +32,7 @@ Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [

## Future plans

- v0.8.0: Image support
- v0.9.0: Complete core unit testing, fix high-level bugs
- v1.0.0: Support for mobile devices
- v0.7.0 supports images
- v0.8.0 improves conversion from external content to the editor and vice versa
- v0.9.0 completes core unit tests, fixes high-level bugs
- v1.0.0 supports mobile devices
9 changes: 6 additions & 3 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Flutterで実装されたリッチテキストエディタです。

Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md)

[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main)

![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da)

## 現在サポートされている機能
Expand All @@ -30,6 +32,7 @@ Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [

## 将来の計画

- v0.8.0: 画像サポート
- v0.9.0: コアユニットテストの完了、重要なバグ修正
- v1.0.0: モバイルデバイスのサポート
- v0.7.0 は画像をサポートしています
- v0.8.0 は外部コンテンツからエディターへの変換とその逆の変換を改善します
- v0.9.0 はコアユニットテストを完了し、ハイレベルのバグを修正します
- v1.0.0 はモバイルデバイスをサポートしています
9 changes: 6 additions & 3 deletions README_KO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Flutter 기반으로 구현된 리치 텍스트 편집기입니다.

Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md)

[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main)

![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da)

## 현재 지원되는 기능
Expand All @@ -30,6 +32,7 @@ Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [

## 미래 계획

- v0.8.0: 이미지 지원
- v0.9.0: 핵심 단위 테스트 완료, 중요한 버그 수정
- v1.0.0: 모바일 기기 지원
- v0.7.0는 이미지를 지원합니다
- v0.8.0은 외부 콘텐츠를 편집기로 변환하고 그 반대로 변환하는 것을 개선합니다
- v0.9.0은 핵심 단위 테스트를 완료하고 고수준 버그를 수정합니다
- v1.0.0은 모바일 기기를 지원합니다
4 changes: 3 additions & 1 deletion lib/editor/widget/nodes/rich_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ class _RichTextWidgetState extends State<RichTextWidget> {
}

SelectingNodeCursor? selectingPosition(SingleNodeCursor? cursor) {
if (cursor is SelectingNodeCursor) {
if (cursor is SelectingNodeCursor &&
cursor.begin is RichTextNodePosition &&
cursor.end is RichTextNodePosition) {
return cursor;
}
return null;
Expand Down
Loading

0 comments on commit 55bd012

Please sign in to comment.