Skip to content
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

refactor: Add in code documentation and rename params for each component #514

Merged
merged 59 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1c21665
feat: implement a new Mix's primitive component
tilucasoli Nov 12, 2024
ac9dfd8
Update main.dart
tilucasoli Nov 12, 2024
a4f04f6
lint
tilucasoli Nov 12, 2024
3d37800
Update rule_config.dart
tilucasoli Nov 12, 2024
a433404
lint fixes
tilucasoli Nov 14, 2024
62b14c0
remove flex alias
tilucasoli Nov 14, 2024
26a1dfe
implement flexbox in the remix
tilucasoli Nov 14, 2024
11eb9e0
lint
tilucasoli Nov 14, 2024
fc40ee6
lint: child and children as last
tilucasoli Nov 14, 2024
90d2a11
lint: add key and spec as first
tilucasoli Nov 14, 2024
753f8a8
add key as first
tilucasoli Nov 14, 2024
2de2a79
fix: lint issues
tilucasoli Nov 14, 2024
b87ab90
remove orderOfModifiers
tilucasoli Nov 14, 2024
976d4ad
fix warnings
tilucasoli Nov 14, 2024
eee9b7f
fix lint
tilucasoli Nov 14, 2024
0c90234
small fixes
tilucasoli Oct 23, 2024
0484e41
lint
tilucasoli Oct 23, 2024
77ca8d6
Update radio_use_case.dart
tilucasoli Oct 23, 2024
9da3188
checkbox
tilucasoli Oct 25, 2024
ee9ac51
avatar
tilucasoli Oct 25, 2024
c0cd4f3
button
tilucasoli Oct 25, 2024
beeb539
callout and button adjustments
tilucasoli Oct 25, 2024
1cd9d19
card
tilucasoli Oct 25, 2024
f7141f2
chip
tilucasoli Oct 25, 2024
8a441c6
dialog
tilucasoli Nov 4, 2024
b84f689
divider
tilucasoli Nov 4, 2024
f3b7fd4
IconButton
tilucasoli Nov 4, 2024
145e0a5
menu item
tilucasoli Nov 4, 2024
f4bf453
progress
tilucasoli Nov 4, 2024
dbde5f5
radio
tilucasoli Nov 4, 2024
8197ac2
scaffold
tilucasoli Nov 4, 2024
cdb4514
segmented control
tilucasoli Nov 4, 2024
a56732e
radio and segmented control
tilucasoli Nov 4, 2024
470a27f
select
tilucasoli Nov 4, 2024
c290e91
slider
tilucasoli Nov 4, 2024
3effc05
toast
tilucasoli Nov 4, 2024
aa49300
accordion
tilucasoli Nov 14, 2024
ef1d96c
callout
tilucasoli Nov 14, 2024
5995f55
checkbox
tilucasoli Nov 14, 2024
e425c4e
chip
tilucasoli Nov 14, 2024
01c0dd7
dialog
tilucasoli Nov 14, 2024
0e8c81a
menu_item
tilucasoli Nov 14, 2024
da4185e
radio
tilucasoli Nov 14, 2024
9f19c23
select
tilucasoli Nov 14, 2024
6ffeb65
textfield
tilucasoli Nov 14, 2024
9b607ae
toast
tilucasoli Nov 14, 2024
05f63fc
Merge branch 'main' into doc/remix-components
leoafarias Nov 15, 2024
1a9ff71
Merge branch 'main' into doc/remix-components
leoafarias Nov 15, 2024
de2ffe5
accordion
tilucasoli Nov 15, 2024
fe9c9c4
button
tilucasoli Nov 15, 2024
61d1802
callout
tilucasoli Nov 15, 2024
9c06175
checkbox
tilucasoli Nov 15, 2024
6e9d2da
chip
tilucasoli Nov 15, 2024
f81d7f9
dialog
tilucasoli Nov 15, 2024
9da20a7
menu item
tilucasoli Nov 15, 2024
2ca725b
radio
tilucasoli Nov 15, 2024
d8cf401
segmentedControl
tilucasoli Nov 15, 2024
3faac27
select
tilucasoli Nov 15, 2024
9ac5e5a
toast
tilucasoli Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/todo_list/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
Expand Down
7 changes: 3 additions & 4 deletions packages/remix/demo/lib/components/badge_use_case.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:demo/helpers/knob_builder.dart';
import 'package:flutter/widgets.dart';
import 'package:remix/remix.dart';
import 'package:widgetbook/widgetbook.dart';
Expand All @@ -12,13 +11,13 @@ Widget buildAvatarUseCase(BuildContext context) {
return Scaffold(
body: Center(
child: Badge(
variants: [
context.knobs.variant(FortalezaBadgeStyle.variants),
],
label: context.knobs.string(
label: 'Label',
initialValue: 'New',
),
variants: const [
// context.knobs.variant(FortalezaBadgeStyle.variants),
],
),
),
);
Expand Down
64 changes: 38 additions & 26 deletions packages/remix/demo/lib/components/button_use_case.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,44 @@ Widget buildButtonUseCase(BuildContext context) {
key: _key,
child: Scaffold(
body: Center(
child: Button(
variants: [
context.knobs.variant(FortalezaButtonStyle.variants),
],
label: context.knobs.string(
label: 'Title',
initialValue: 'Button',
),
onPressed: () {},
disabled: context.knobs.boolean(
label: 'Disabled',
initialValue: false,
),
loading: context.knobs.boolean(
label: 'loading',
initialValue: false,
),
iconLeft: context.knobs.iconData(
label: 'Icon left',
initialValue: null,
),
iconRight: context.knobs.iconData(
label: 'Icon right',
initialValue: null,
),
),
child: Builder(builder: (context) {
return Button(
variants: [
context.knobs.variant(FortalezaButtonStyle.variants),
],
label: context.knobs.string(
label: 'Title',
initialValue: 'Button',
),
onPressed: () {
showToast(
context: context,
entry: ToastEntry(
showDuration: const Duration(milliseconds: 800),
builder: (context, actions) => const Toast(
title: 'Button pressed',
),
),
);
},
disabled: context.knobs.boolean(
label: 'Disabled',
initialValue: false,
),
loading: context.knobs.boolean(
label: 'loading',
initialValue: false,
),
iconLeft: context.knobs.iconData(
label: 'Icon left',
initialValue: null,
),
iconRight: context.knobs.iconData(
label: 'Icon right',
initialValue: null,
),
);
}),
),
),
);
Expand Down
42 changes: 27 additions & 15 deletions packages/remix/demo/lib/components/icon_button_use_case.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/widgets.dart';
import 'package:remix/remix.dart';
import 'package:widgetbook/widgetbook.dart';
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;

import '../helpers/knob_builder.dart';

final _key = GlobalKey();
Expand All @@ -17,21 +18,32 @@ Widget buildButtonUseCase(BuildContext context) {
key: _key,
child: Scaffold(
body: Center(
child: IconButton(
m.Icons.add,
variants: [
context.knobs.variant(FortalezaIconButtonStyle.variants),
],
onPressed: () {},
disabled: context.knobs.boolean(
label: 'Disabled',
initialValue: false,
),
loading: context.knobs.boolean(
label: 'loading',
initialValue: false,
),
),
child: Builder(builder: (context) {
return IconButton(
m.Icons.add,
variants: [
context.knobs.variant(FortalezaIconButtonStyle.variants),
],
onPressed: () {
showToast(
context: context,
entry: ToastEntry(
showDuration: const Duration(milliseconds: 800),
builder: (context, actions) =>
const Toast(title: 'Button pressed'),
),
);
},
disabled: context.knobs.boolean(
label: 'Disabled',
initialValue: false,
),
loading: context.knobs.boolean(
label: 'loading',
initialValue: false,
),
);
}),
),
),
);
Expand Down
Loading
Loading