From e2065bd1ae9f53889ebe76ed96997837f8ca6cd1 Mon Sep 17 00:00:00 2001 From: Joe Kawai Date: Sun, 23 Jun 2024 19:36:04 +0800 Subject: [PATCH] Typography revamp (#49) * Initial * Add documentation for widgets (#48) * Fix separator throwing error in row * Document badge * Document button * Document card * Document dialog * Document header * Add documentation for remaining widgets * Commit from GitHub Actions (Forui Presubmit) * Fix golden images * Commit from GitHub Actions (Forui Samples Presubmit) * Fix gitignore * Commit from GitHub Actions (Forui Samples Presubmit) --------- Co-authored-by: Pante * Commit for rebase * Initial * Commit for rebase * Resolve merge conflict * Complete implementation * Update golden tests * Fix failing build * Fix pr issues --------- Co-authored-by: Matthias Ngeo Co-authored-by: Pante --- .../runConfigurations/Forui_Example___run.xml | 6 - .../{dev.xml => docs___run.xml} | 2 +- .idea/runConfigurations/forui___tests.xml | 8 + ... => forui___update_golden_test_images.xml} | 2 +- .idea/runConfigurations/samples___run.xml | 6 + CONTRIBUTING.md | 35 -- forui/lib/src/theme/theme.dart | 27 +- forui/lib/src/theme/theme_data.dart | 44 +- forui/lib/src/theme/typography.dart | 496 +++++++----------- .../lib/src/widgets/badge/badge_content.dart | 2 +- forui/lib/src/widgets/badge/badge_styles.dart | 12 +- .../src/widgets/button/button_content.dart | 15 +- forui/lib/src/widgets/card/card.dart | 1 - forui/lib/src/widgets/card/card_content.dart | 64 ++- forui/lib/src/widgets/dialog/dialog.dart | 115 ++-- .../src/widgets/dialog/dialog_content.dart | 104 ++-- forui/lib/src/widgets/header/header.dart | 24 +- .../src/widgets/text_field/text_field.dart | 14 +- .../widgets/text_field/text_field_style.dart | 17 +- ...-Variant.destructive-raw-badge-content.png | Bin 26015 -> 26813 bytes ...Variant.destructive-text-badge-content.png | Bin 26015 -> 26813 bytes ...dark-Variant.outline-raw-badge-content.png | Bin 27024 -> 28038 bytes ...ark-Variant.outline-text-badge-content.png | Bin 27024 -> 28038 bytes ...dark-Variant.primary-raw-badge-content.png | Bin 26066 -> 26952 bytes ...ark-Variant.primary-text-badge-content.png | Bin 26066 -> 26952 bytes ...rk-Variant.secondary-raw-badge-content.png | Bin 25904 -> 26888 bytes ...k-Variant.secondary-text-badge-content.png | Bin 25904 -> 26888 bytes ...-Variant.destructive-raw-badge-content.png | Bin 25832 -> 26474 bytes ...Variant.destructive-text-badge-content.png | Bin 25832 -> 26474 bytes ...ight-Variant.outline-raw-badge-content.png | Bin 26734 -> 27697 bytes ...ght-Variant.outline-text-badge-content.png | Bin 26734 -> 27697 bytes ...ight-Variant.primary-raw-badge-content.png | Bin 26041 -> 26900 bytes ...ght-Variant.primary-text-badge-content.png | Bin 26041 -> 26900 bytes ...ht-Variant.secondary-raw-badge-content.png | Bin 25600 -> 26501 bytes ...t-Variant.secondary-text-badge-content.png | Bin 25600 -> 26501 bytes ...nt.destructive-disabled-button-content.png | Bin 29879 -> 30420 bytes ...ant.destructive-enabled-button-content.png | Bin 30225 -> 30805 bytes ...ariant.outline-disabled-button-content.png | Bin 30466 -> 30956 bytes ...Variant.outline-enabled-button-content.png | Bin 30902 -> 31483 bytes ...ariant.primary-disabled-button-content.png | Bin 29187 -> 29666 bytes ...Variant.primary-enabled-button-content.png | Bin 30442 -> 31045 bytes ...iant.secondary-disabled-button-content.png | Bin 29787 -> 30306 bytes ...riant.secondary-enabled-button-content.png | Bin 30206 -> 30810 bytes ...nt.destructive-disabled-button-content.png | Bin 28108 -> 28433 bytes ...ant.destructive-enabled-button-content.png | Bin 29704 -> 30133 bytes ...ariant.outline-disabled-button-content.png | Bin 30181 -> 30696 bytes ...Variant.outline-enabled-button-content.png | Bin 30916 -> 31437 bytes ...ariant.primary-disabled-button-content.png | Bin 29236 -> 29687 bytes ...Variant.primary-enabled-button-content.png | Bin 30393 -> 31012 bytes ...iant.secondary-disabled-button-content.png | Bin 29353 -> 29902 bytes ...riant.secondary-enabled-button-content.png | Bin 30065 -> 30552 bytes .../card/zinc-dark-raw-card-content.png | Bin 38728 -> 43686 bytes .../card/zinc-dark-text-card-content.png | Bin 38728 -> 43686 bytes .../card/zinc-light-raw-card-content.png | Bin 37570 -> 43797 bytes .../card/zinc-light-text-card-content.png | Bin 37570 -> 43797 bytes ...ark-Axis.horizontal-raw-dialog-content.png | Bin 18156 -> 23514 bytes ...rk-Axis.horizontal-text-dialog-content.png | Bin 18156 -> 23514 bytes ...-dark-Axis.vertical-raw-dialog-content.png | Bin 18239 -> 23667 bytes ...dark-Axis.vertical-text-dialog-content.png | Bin 18239 -> 23667 bytes ...ght-Axis.horizontal-raw-dialog-content.png | Bin 17731 -> 23280 bytes ...ht-Axis.horizontal-text-dialog-content.png | Bin 17731 -> 23280 bytes ...light-Axis.vertical-raw-dialog-content.png | Bin 17902 -> 23335 bytes ...ight-Axis.vertical-text-dialog-content.png | Bin 17902 -> 23335 bytes forui/test/golden/header/zinc-dark-header.png | Bin 46128 -> 55847 bytes .../golden/header/zinc-dark-raw-title.png | Bin 28308 -> 28876 bytes .../test/golden/header/zinc-light-header.png | Bin 45919 -> 55347 bytes .../golden/header/zinc-light-raw-title.png | Bin 28243 -> 28845 bytes .../default-zinc-dark-focused-no-text.png | Bin 7558 -> 8521 bytes .../default-zinc-dark-focused-raw-text.png | Bin 8056 -> 9279 bytes .../default-zinc-dark-focused-text.png | Bin 8180 -> 9369 bytes .../default-zinc-dark-unfocused-no-text.png | Bin 7423 -> 8443 bytes .../default-zinc-dark-unfocused-raw-text.png | Bin 7916 -> 9118 bytes .../default-zinc-dark-unfocused-text.png | Bin 8039 -> 9201 bytes .../default-zinc-light-focused-no-text.png | Bin 7326 -> 8417 bytes .../default-zinc-light-focused-raw-text.png | Bin 8019 -> 9250 bytes .../default-zinc-light-focused-text.png | Bin 8043 -> 9279 bytes .../default-zinc-light-unfocused-no-text.png | Bin 7205 -> 8331 bytes .../default-zinc-light-unfocused-raw-text.png | Bin 7935 -> 9125 bytes .../default-zinc-light-unfocused-text.png | Bin 7961 -> 9156 bytes .../email-zinc-dark-focused-no-text.png | Bin 7554 -> 8732 bytes .../email-zinc-dark-focused-text.png | Bin 5717 -> 6187 bytes .../email-zinc-dark-unfocused-no-text.png | Bin 7437 -> 8641 bytes .../email-zinc-dark-unfocused-text.png | Bin 5550 -> 6005 bytes .../email-zinc-light-focused-no-text.png | Bin 7383 -> 8669 bytes .../email-zinc-light-focused-text.png | Bin 5775 -> 6149 bytes .../email-zinc-light-unfocused-no-text.png | Bin 7277 -> 8596 bytes .../email-zinc-light-unfocused-text.png | Bin 5685 -> 6022 bytes .../error-zinc-dark-focused-no-text.png | Bin 7405 -> 8230 bytes .../error-zinc-dark-focused-raw-text.png | Bin 8133 -> 9263 bytes .../error-zinc-dark-focused-text.png | Bin 8055 -> 9123 bytes .../error-zinc-dark-unfocused-no-text.png | Bin 7349 -> 8216 bytes .../error-zinc-dark-unfocused-raw-text.png | Bin 8045 -> 9202 bytes .../error-zinc-dark-unfocused-text.png | Bin 7969 -> 9070 bytes .../error-zinc-light-focused-no-text.png | Bin 7430 -> 8522 bytes .../error-zinc-light-focused-raw-text.png | Bin 8222 -> 9592 bytes .../error-zinc-light-focused-text.png | Bin 8128 -> 9387 bytes .../error-zinc-light-unfocused-no-text.png | Bin 7384 -> 8518 bytes .../error-zinc-light-unfocused-raw-text.png | Bin 8176 -> 9544 bytes .../error-zinc-light-unfocused-text.png | Bin 8084 -> 9338 bytes .../multiline-zinc-dark-focused-no-text.png | Bin 5574 -> 5947 bytes .../multiline-zinc-dark-focused-text.png | Bin 26501 -> 38334 bytes .../multiline-zinc-dark-unfocused-no-text.png | Bin 5486 -> 5890 bytes .../multiline-zinc-dark-unfocused-text.png | Bin 26425 -> 38243 bytes .../multiline-zinc-light-focused-no-text.png | Bin 5559 -> 5942 bytes .../multiline-zinc-light-focused-text.png | Bin 28522 -> 38958 bytes ...multiline-zinc-light-unfocused-no-text.png | Bin 5468 -> 5858 bytes .../multiline-zinc-light-unfocused-text.png | Bin 28645 -> 38823 bytes .../password-zinc-dark-focused-no-text.png | Bin 7104 -> 7667 bytes .../password-zinc-dark-focused-text.png | Bin 5977 -> 6339 bytes .../password-zinc-dark-unfocused-no-text.png | Bin 6989 -> 7580 bytes .../password-zinc-dark-unfocused-text.png | Bin 5865 -> 6258 bytes .../password-zinc-light-focused-no-text.png | Bin 7020 -> 7675 bytes .../password-zinc-light-focused-text.png | Bin 5952 -> 6365 bytes .../password-zinc-light-unfocused-no-text.png | Bin 6914 -> 7600 bytes .../password-zinc-light-unfocused-text.png | Bin 5872 -> 6216 bytes forui/test/src/theme/typoegraphy_test.dart | 200 ------- forui/test/src/theme/typography_test.dart | 228 ++++++++ .../text_field/flutter_test_config.dart | 2 +- samples/lib/widgets/separator.dart | 17 +- 119 files changed, 641 insertions(+), 800 deletions(-) delete mode 100644 .idea/runConfigurations/Forui_Example___run.xml rename .idea/runConfigurations/{dev.xml => docs___run.xml} (78%) create mode 100644 .idea/runConfigurations/forui___tests.xml rename .idea/runConfigurations/{Update_Golden_Test_Images.xml => forui___update_golden_test_images.xml} (67%) create mode 100644 .idea/runConfigurations/samples___run.xml delete mode 100644 forui/test/src/theme/typoegraphy_test.dart create mode 100644 forui/test/src/theme/typography_test.dart diff --git a/.idea/runConfigurations/Forui_Example___run.xml b/.idea/runConfigurations/Forui_Example___run.xml deleted file mode 100644 index 7c4a018bd..000000000 --- a/.idea/runConfigurations/Forui_Example___run.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/dev.xml b/.idea/runConfigurations/docs___run.xml similarity index 78% rename from .idea/runConfigurations/dev.xml rename to .idea/runConfigurations/docs___run.xml index 87dae7612..e6ea3f5ff 100644 --- a/.idea/runConfigurations/dev.xml +++ b/.idea/runConfigurations/docs___run.xml @@ -1,5 +1,5 @@ - + diff --git a/.idea/runConfigurations/forui___tests.xml b/.idea/runConfigurations/forui___tests.xml new file mode 100644 index 000000000..9a7619973 --- /dev/null +++ b/.idea/runConfigurations/forui___tests.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Update_Golden_Test_Images.xml b/.idea/runConfigurations/forui___update_golden_test_images.xml similarity index 67% rename from .idea/runConfigurations/Update_Golden_Test_Images.xml rename to .idea/runConfigurations/forui___update_golden_test_images.xml index bbfedd410..5f492b8c1 100644 --- a/.idea/runConfigurations/Update_Golden_Test_Images.xml +++ b/.idea/runConfigurations/forui___update_golden_test_images.xml @@ -1,5 +1,5 @@ - +