mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #303 from AppFlowy-IO/feat/commit_lint
Feat/commit lint
This commit is contained in:
commit
92b3f3e769
12
.github/workflows/commitlint.yml
vendored
Normal file
12
.github/workflows/commitlint.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
name: Lint Commit Messages
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: wagoid/commitlint-github-action@v4
|
||||
|
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no -- commitlint --edit
|
1
commitlint.config.js
Normal file
1
commitlint.config.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = {extends: ['@commitlint/config-conventional']}
|
@ -1,6 +1,7 @@
|
||||
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
|
||||
import 'package:flowy_infra/image.dart';
|
||||
import 'package:flowy_infra/notifier.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -81,6 +82,7 @@ class FlowyNavigation extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _renderCollapse(BuildContext context, PublishNotifier<bool> collapsedNotifier) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
return ChangeNotifierProvider.value(
|
||||
value: collapsedNotifier,
|
||||
child: Consumer(
|
||||
@ -94,7 +96,7 @@ class FlowyNavigation extends StatelessWidget {
|
||||
notifier.value = false;
|
||||
},
|
||||
iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2),
|
||||
icon: svg("home/hide_menu"),
|
||||
icon: svg("home/hide_menu", color: theme.iconColor),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -1,7 +1,9 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flowy_infra/image.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FlowyIconButton extends StatelessWidget {
|
||||
final double width;
|
||||
@ -30,16 +32,6 @@ class FlowyIconButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget child = icon;
|
||||
|
||||
// if (onPressed == null) {
|
||||
// child = ColorFiltered(
|
||||
// colorFilter: ColorFilter.mode(
|
||||
// Colors.grey,
|
||||
// BlendMode.saturation,
|
||||
// ),
|
||||
// child: child,
|
||||
// );
|
||||
// }
|
||||
final size = Size(width, height ?? width);
|
||||
|
||||
assert(size.width > iconPadding.horizontal);
|
||||
|
Loading…
Reference in New Issue
Block a user