Compare commits

...
727 Commits
Author SHA1 Message Date
Nathan.fooo aecea10fd2 chore: bump client api and collab (#4900) 2024-03-14 16:23:45 +08:00
Richard Shiue 5a837a9482 fix: number and select filter logic (#4828)
* fix: number and select option filter bugs

* chore: rename filter condition enum and variants
2024-03-14 14:27:57 +08:00
Nathan.fooo 1a34366a3f chore: bump client api that adding constraints for init sync (#4897) 2024-03-14 12:24:49 +08:00
Richard Shiue 191a077a86 refactor: streamline create row logic (#4807) 2024-03-14 11:26:32 +08:00
Richard ShiueandMathias Mogensen 25d4b4f718 chore: revamp mobile url editor (#4602)
* chore: revamp mobile url editor

* chore: add i18n

* chore: use shared url launcher

* chore: translation bump

* chore: add a toast notification after URL is copied to clipboard

* chore: listen to onchanged

* chore: improve text field editing experience

* chore: disable quick action buttons if url cell data is empty

* chore: apply suggestions from code review

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

* chore: provide the bloc and watch changes

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2024-03-14 09:36:29 +08:00
Richard Shiueandnathan 48cac4c5ac feat: advanced filters backend logic (#4688)
* feat: implement advanced filters

* test: adapt tests to changes

* test: add advanced filter tests

* chore: adapt flutter frontend to changes

* chore: adapt tauri frontend to changes

* chore: bump collab

* chore: launch review

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-03-14 09:35:45 +08:00
Lucas.Xu 80e210b34a fix: sign in toast issue (#4895) 2024-03-14 09:17:59 +08:00
Nathan.fooo b57a870242 chore: 052 (#4890) 2024-03-13 19:40:36 +08:00
Nathan.fooo fd81d64a32 chore: fix database test (#4893)
* chore: fix database test

* chore: clippy

* chore: fmt
2024-03-13 19:39:56 +08:00
Zackandnathan bf70be1841 feat: add icon field (#4824)
* feat: add icon field

* fix: add sqlx migration files

* chore: fix tst

* chore: fix duplicate event name

* chore: update to lastest stable rust toolchain

* chore: use 1.75 channel

* chore: fix duplicate event name

* chore: fix duplicate event name

* chore: use more reliable assertion

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-03-13 15:07:52 +08:00
Richard Shiue af16299c83 fix: version bump sheet package (#4889) 2024-03-13 15:02:23 +08:00
polotop07100andRichard Shiue bb865c8f33 chore: update fr-FR translations (#4803)
* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* chore: shuffle translation tokens

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2024-03-13 14:17:31 +08:00
nathan 0f48310e22 chore: fix test 2024-03-13 13:30:29 +08:00
Zackandnathan 2c8fa1a2c3 chore: update client api (#4886)
* chore: update client api

* chore: bump client api

* ci: fix test

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-03-13 11:32:51 +08:00
Kilu.He 3dcf435f7d feat: support new settings UI (#4874)
* feat: support new settings UI

* feat: support splashscreen for tauri
2024-03-12 16:58:17 +08:00
Nathan.fooo 9c3be7e488 fix: stuck when importing large csv file (#4878)
* chore: fix import csv file

* chore: update collab

* chore: bump collab

* chore: workaround for row creating

* fix: test
2024-03-12 10:59:52 +08:00
Mathias MogensenandRichard Shiue c48001bd74 fix: launch review 0.5.1 (#4855)
* feat: floating calculations row

* fix: calculate cell overflow + tooltip

* fix: empty text cell should be counted as empty

* fix: empty text cell sohuld not be counted as not empty

* fix: conversion of some field types for calculations

* fix: tooltip + size of duplicate event button

* fix: minor view meta info changes

* fix: apply number format on word/char count

* fix: dart format

* fix: hide arrow for calc values

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2024-03-11 10:41:51 +01:00
Richard Shiue 7afae69fe4 fix: release windows ci (#4873) 2024-03-11 16:48:44 +08:00
Lucas.Xu dd3f8b247a fix: only adding http(s) scheme if needed (#4871) 2024-03-11 16:43:43 +08:00
Richard Shiue b4c8011881 ci: fix flaky flutter integration tests (#4870) 2024-03-11 12:27:04 +08:00
Lucas.Xu f404882343 fix: disable the shortcut for converting to numbered list when the block is a heading (#4868) 2024-03-11 11:55:52 +08:00
Lucas.Xu fb887bec10 fix: potential risk of being unable to launch URLs without HTTP(S) scheme (#4867) 2024-03-11 11:02:29 +08:00
Richard Shiue 4b5195d891 ci: fix rust ci (#4861) 2024-03-10 16:02:30 +08:00
Nathan.fooo ddd4ba8287 chore: bump client api (#4860)
* chore: bump client api

* chore: bump client api
2024-03-10 13:52:54 +08:00
stmrandRichard Shiue 05f3885346 feat: support cs-CZ language (#4066)
* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* chore: enable czech language in settings

* chore: rename translation file

* chore: rename in inlang project json

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2024-03-09 12:25:04 +08:00
Richard Shiue 70404816e7 fix: restore to use more conventional keyboard tab navigation (#4851) 2024-03-08 17:30:26 +08:00
Kilu.He 14f789f50b fix: support upload and render image(.git, .webp, .svg) (#4841)
* fix: add supported extension of image

* fix: display of select options when no typing

* chore: focus end when cell input actived

* fix: modified checklist keyboard event
2024-03-08 14:15:57 +08:00
Richard Shiue 574cca0a8b fix: bottom sheet color and sort ui imrprovement (#4849) 2024-03-08 10:16:03 +08:00
Richard Shiue f9c1cadbe0 chore: invalid url open behavior (#4850)
* chore: invalid url open behavior

* chore: use https instead of http by default
2024-03-08 10:15:19 +08:00
Lucas.Xu 6bac0412eb fix: v0.5.1 issues (#4844)
* chore: improve clear cache hint text

* fix: remove color tab in image picker
2024-03-07 23:13:04 +08:00
Richard Shiue 2a65c193c2 fix: desktop grid launch review (#4840)
* chore: disable changing the type of primary fields

* fix: don't persist text selection after text update in checklist

* chore: allow fn + backspace in macos to delete checklist item

* chore: shorten opacity fade between opacity shown and not shown

* fix: arrow key focus traversal
2024-03-07 21:05:19 +08:00
Mathias Mogensen cd245b5f0a fix: focus traversal in checklist popover (#4843)
* fix: focus traversal in checklist popover

* fix: dont trim input

* chore: remove redundant state var

* chore: remove late from controller
2024-03-07 21:04:10 +08:00
Richard Shiue 677617dcf2 fix: mobile grid launch review (#4839)
* fix: mobile database sort editor not working on prod

* fix: don't pop after creating field
2024-03-07 17:32:24 +08:00
Kilu.He a180cfcdc2 chore: support publish tauri app (#4829)
* chore: support publish tauri app

* chore: fixed others bugs

* fix: code review

* fix: code review

* fix: tauri ci
2024-03-07 13:46:09 +08:00
Lucas.Xu 0f13f86917 chore: update editor version (#4836) 2024-03-07 12:56:56 +08:00
Nathan.fooo 3d8ff062b5 chore: bump client api (#4819)
* chore: bump client api

* chore: bump client api

* chore: update ci

* chore: update client api

* chore: ci config

* chore: bump client api

* chore: bump client api

* chore: bump client api
2024-03-07 12:50:28 +08:00
Lucas.Xu 780f08dd28 test: execute the integration tests concurrently (#4831) 2024-03-07 12:48:51 +08:00
Richard Shiue 270d1c68b2 fix: relation hotfix (#4837) 2024-03-07 11:37:51 +08:00
Zack 88d14e7bde fix: delete workspace no panic (#4832) 2024-03-07 10:15:50 +08:00
Richard Shiue 90ebcb4cfc chore: enable relation (#4835) 2024-03-07 10:12:34 +08:00
Lucas.Xu a1823fa4c0 feat: feature flag in settings page (#4833) 2024-03-07 09:28:58 +08:00
Lucas.Xu f484675008 fix: uninitialized error in members setting page (#4834) 2024-03-07 09:28:31 +08:00
Mathias Mogensen f5cb8b6d25 fix: image url check for embed link (#4826)
* fix: image url check in for embed link

* chore: move all patterns to shared

* test: prefer enterText over manipulating widget
2024-03-06 16:31:30 +01:00
Zack 6e2caf3358 fix: delete workspace after deleting from remote (#4830) 2024-03-06 17:27:52 +08:00
Mathias Mogensen 66aea29ab7 feat: generic calculations (#4794)
* feat: add generic calculations

* chore: remove row count at bottom of grid

* fix: code review
2024-03-05 19:16:56 +01:00
Richard Shiue 3b0d82287d fix: some mobile ui bugs (#4823)
* fix: select option editor mobile

* chore: field type icon
2024-03-05 21:45:39 +08:00
Lucas.Xu b05897d3ab chore: add iOS integration test CI (#4822) 2024-03-05 17:20:27 +08:00
Kilu.He 2ec6250ddd feat: support uploading local image (#4820)
* feat: support uploading local image

* fix: code review

* fix: add hover style to empty image block
2024-03-05 16:59:30 +08:00
Richard Shiue ff8eb0d479 chore: mobile grid dark mode improvements (#4821)
* chore: field type grid

* chore: don't allow hiding primary field

* chore: bottom sheets

* chore: checklist bottom sheet
2024-03-05 15:44:16 +08:00
Lucas.Xu c8e86f4f26 feat: open workspace, rename workspace and update workspace icon (#4818)
* feat: support opening a workspace

* feat: support renaming a workspace

* fix: rename issue

* fix: rename issues

* feat: refactor menu bloc

* test: add collaborative workspace test

* test: add open workspace integration tet

* test: add delete workspace integration tet

* chore: turn off collab workspace feature
2024-03-05 13:51:03 +08:00
Kilu.He c0210a5778 feat: support adding cover to document (#4814) 2024-03-05 10:57:52 +08:00
Mathias Mogensen 5daf9d23f5 fix: update view names in page reference menu (#4802) 2024-03-04 18:24:49 +01:00
Mathias Mogensen b087a9aeb3 fix: filter keydownevents in actions handler (#4817) 2024-03-04 13:42:42 +01:00
Mathias Mogensen 107e3cea4f feat: duplicate calendar event (#4816)
* feat: duplicate calendar event

* test: add simple test
2024-03-04 12:42:00 +01:00
Mathias Mogensen ba965caa8f fix: stop hover when scrolling (#4801) 2024-03-04 12:41:34 +01:00
Zack 2af93a9bcb feat: add support for renaming and updating the icon for workspaces (#4806) 2024-03-04 16:05:16 +08:00
Nathan.fooo f8962edfd7 chore: bump client api (#4804)
* chore: bump client api

* chore: bump client api

* chore: bump client api
2024-03-04 14:05:04 +08:00
Lucas.Xu b236afd0c3 chore: update version to 0.5.1 (#4811) 2024-03-04 12:28:28 +08:00
Lucas.Xu 8944edf75f feat: support clearing caches and fix unable to load image (#4809)
* feat: support clearing caches

* fix: try to clear the image cache when loading failed.

* feat: clear cache on mobile

* chore: add error log
2024-03-04 12:24:25 +08:00
Richard Shiue 6b05be2362 fix: remove dup translation token and rearrange (#4810) 2024-03-04 12:01:31 +08:00
Lucas.Xu 90146148b6 feat: show the workspace list on top-left corner (#4799) 2024-03-04 10:43:00 +08:00
Mathias Mogensen 63464cbf2e fix: launch url on all platforms (#4797)
* fix: error handled launchUrl

* chore: update links to use new subdomain

* feat: show toast if onFailure is not provided
2024-03-03 22:04:59 +01:00
Daniil 1fadb15351 chore: update russian translations (#4796) 2024-03-03 09:41:33 +08:00
Lucas.Xu 8732c3c28b feat: members settings (#4788)
* feat: add member settings

* feat: fetch workspace members from server

* feat: add translations

* feat: implement invite feature

* feat: support inviting people via email

* feat: support updating member role

* feat: add feature flag to control the visibilty of members settings
2024-03-03 09:36:12 +08:00
YiHeCN f7233f6949 chore: update zh-CN translations (#4795) 2024-03-03 00:05:43 +08:00
Sore 8c7ed808a7 chore: rename ckb-KUR.json to ckb-KU.json (#4786) 2024-03-02 22:51:20 +08:00
Richard Shiue b38fc43300 feat: checklist cell editor a11y improvement (#4784) 2024-03-02 19:14:00 +08:00
Richard Shiue f4170755fa fix: reorder grid field updating all views (#4791) 2024-03-02 18:27:34 +08:00
Richard Shiue 79585d0835 fix: flutter_ci (#4793) 2024-03-02 17:30:27 +08:00
Kilu.He 835563f81b feat: support image block (#4783) 2024-03-01 10:48:07 +08:00
Richard Shiue 37bc5b3fbf chore: type option handler cleanup (#4787) 2024-03-01 10:26:38 +08:00
Richard Shiue 682bf19838 chore: type option cell data trait cleanup (#4782)
* chore: remove dead code

* chore: remove legacy FromCellStringTrait
2024-02-29 15:48:06 +08:00
Richard Shiue f4ca3ef782 feat: add basic relation field (#4397)
* feat: add basic relation field

* fix: clippy

* fix: tauri build 🤞

* chore: merge changes

* fix: merge main

* chore: initial code review pass

* fix: rust-lib test

* chore: code cleanup

* fix: unwrap or default
2024-02-29 14:38:18 +08:00
Richard Shiue f826d05f03 fix: mobile ui fixes (#4780)
* fix: adjust mobile grid padding

* fix: reorder field not working
2024-02-29 09:44:48 +08:00
Richard Shiue 01f2b15f70 fix: type option transform for checklists (#4779) 2024-02-28 22:04:32 +08:00
Mathias Mogensen 2d6856a23d fix: edit column sheet uniform ui (#4774) 2024-02-28 22:04:16 +08:00
Mohammad Zolfaghari 2286a1c726 feat: rtl toolbar item setting (#3958) 2024-02-28 21:56:18 +08:00
domenico code ef90c35175 chore: update translations (#4753) 2024-02-28 21:55:52 +08:00
Mathias Mogensen af12beb1c3 fix: remove empty space if no email (#4777) 2024-02-28 13:23:06 +01:00
Mathias Mogensen 0d68c42aab fix: symmetric padding in mobile database header (#4773) 2024-02-28 13:21:23 +01:00
Mathias Mogensen 0cffe42d80 fix: add time to view meta info (#4769) 2024-02-28 12:34:02 +01:00
Lucas.Xu abd08e5e53 feat: support customizing font and color before typing (#4765)
* fix: bius buttons highlight status

* feat: support customizing font family before typing

* feat: support customizing text color before typing
2024-02-28 15:51:50 +08:00
Kilu.He e250f780a4 feat: support to show condition in filter chip label (#4751)
* feat: support to show condition in filter chip label

* fix: improve the performance of inline formula with selection
2024-02-28 14:26:08 +08:00
Lucas.XuandMathias Mogensen 980bebf86a fix: mobile UI regression (#4754)
* fix: aa menu item selected status

* feat: support selecting word on iOS throught long pressing

* chore: update editor version

* feat: update add block menu colors

* feat: add scrollbar in bottom sheet

* fix: aa menu should not dimiss after changing block type

* fix: add link menu ui issues

* feat: sync bius status

* Update frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar_item.dart

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

* chore: update editor version

* fix: flutter analyze

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2024-02-28 13:32:24 +08:00
Mathias Mogensen 26f8397624 feat: duplicate field with cell data (#4737)
* feat: duplicate field with cell data

* chore: code review remove extra option
2024-02-27 14:42:16 +01:00
Lucas.Xu d67e904f56 chore: cleanup disk space before running mobile ci (#4744)
* chore: use macos instead of linux in ci to avoid no spaces error

* chore: optimize disk space
2024-02-27 21:41:47 +08:00
Lucas.Xu f36ca3777b fix: unable to resize the image (#4750) 2024-02-27 21:41:14 +08:00
Richard Shiue 74233d2606 fix: mobile regression (#4747) 2024-02-27 10:51:32 +08:00
Nathan.fooo faea0fa532 chore: Update CHANGELOG.md 2024-02-27 03:37:56 +08:00
Lucas.Xu 3454af1caa chore: update privacy and terms link (#4742) 2024-02-26 15:29:55 +08:00
Nathan.fooo 8d50ad2936 chore: fix log (#4740)
* chore: fix log

* chore: fix log

* chore: bump client api
2024-02-26 15:27:12 +08:00
Richard Shiue daedf95c95 fix: some mobile database bugs (#4738)
* chore: no autofocus on field name

* refactor: one, two, many

* chore: reduce spacing between tabbar header and grid header

* fix: update field type

* fix: cannot edit view name

* fix: title for select field type bottom sheet

* fix: forget checks, just do it
2024-02-26 15:13:38 +08:00
Lucas.Xu 95bfda9dc6 chore: update changelog (#4743) 2024-02-26 15:02:04 +08:00
Lucas.Xu 93664167e0 fix: unable to redo/undo in lists and data loss issues (#4739) 2024-02-26 14:21:36 +08:00
Lucas.Xu dfe3b0a929 fix: the button sizes in math equation input field are not same (#4741) 2024-02-26 14:21:27 +08:00
Kilu.He e2028ac5a0 fix: database bugs (#4632)
* fix: database bugs

* fix: calendar picker

* fix: the position of collapse menu button

* fix: modified some style

* fix: slash command

* fix: selection style

* fix: support toggle inline formula

* fix: block color effect grid block

* fix: if isRange and date is greater than endDate, swap date and endDate

* fix: remove sorting before insert row

* fix: toggle property visible status

* fix: modified tauri window size

* fix: placeholder should be hidden when composing

* fix: support href shortcut

* fix: prevent submit when the formula has error

* fix: modified layout selection

* fix: add padding for record edit

* fix: remove sorts before drag row

* fix: modified chip style

* fix: if previous node is an embed, merge the current node to another node which is not an embed

* fix: modified emoji picker
2024-02-26 10:19:21 +08:00
Mathias Mogensen c9dc24a13c fix: launch review 0.5.0 (#4735)
* fix: top bar buttons slow respond

* fix: fav button responsive

* fix: add favorite button to database views

* fix: add overflow to calculation

* fix: minor workaround for showing number format prefix

* fix: clear calculation on empty field cells

* fix: average calculation should not have def value

* fix: cargo fmt
2024-02-25 21:32:44 +01:00
Mathias Mogensen 609557c357 feat: word and char count (#4705)
* feat: word and char count

* chore: lints after merge

* feat: add create time of view in more action

* fix: missing comma lint

* feat: add duplicate/delete + database view more

* fix: dispose logic

* feat: code cleanup

* fix: add false for isDocument in databases

* feat: register view info bloc on plugin basis

* fix: accidental removal

* chore: clean up

* fix: add ViewInfoBloc above Row Document Editor

* chore: final clean up
2024-02-25 16:46:13 +01:00
Lucas.Xu 93af6e69a1 feat: convert link preview block to url text (#4734) 2024-02-25 22:59:23 +08:00
Lucas.Xu b75947b630 fix: unable to click the items in a long list (#4733) 2024-02-25 21:36:46 +08:00
Lucas.Xu b60d25a0e3 fix: unable to upload image from clipboard (#4728)
* fix: unable to upload image from clipboard

* chore: apply suggestion
2024-02-25 18:50:35 +08:00
Richard Shiue 537fa52e77 chore: move database domain code to its own folder (#4556) 2024-02-25 18:38:18 +08:00
Richard Shiue d861ce6227 fix: mobile view and field list bottom sheets (#4727) 2024-02-25 11:51:18 +08:00
Nathan.fooo c3e5aa29fc fix: doc open sync (#4732)
* chore: bump client api

* fix: open document and folder

* chore: bump collab rev

* chore: fix wasm build

* chore: fix warnings
2024-02-25 07:49:44 +08:00
Richard Shiue 4ca3ba8e08 fix: cjk input in calendar and row detail (#4726) 2024-02-24 22:55:35 +08:00
Richard Shiue f5cc6521fb chore: clean up db sort blocs (#4725) 2024-02-24 22:55:22 +08:00
Lucas.Xu cea1c17b76 feat: improve outline block (#4722) 2024-02-24 21:54:21 +08:00
Lucas.Xu 2abb396467 feat: use result instead of either (#4724)
* feat: use result instead of either

* chore: remove dartz
2024-02-24 21:54:10 +08:00
Lucas.Xu 236b5bfe90 feat: error message should persist on the image block (#4710) 2024-02-24 11:05:20 +08:00
Dev-for-fun fa3bc97698 fix: remove duplicated button labels for done, cancel and ok (#4718) 2024-02-23 23:01:01 +08:00
Richard Shiue c0796e8ae5 feat: mobile sort editor (#4714) 2024-02-23 20:47:19 +08:00
Richard Shiue acd75befbc fix: disable onTap when quick action button is disabled (#4713) 2024-02-23 16:56:31 +08:00
Richard Shiue 746f0817bc fix: show database view options for inline as disabled (#4711) 2024-02-23 10:49:34 +08:00
Lucas.Xu c0b667b4ea chore: optimize image block actions menu (#4707) 2024-02-23 09:46:21 +08:00
Lucas.XuandMathias Mogensen ef83688907 fix: the keyboard blocked the content of bottom sheet (#4706)
* fix: the keyboard blocked the content of bottom sheet

* chore: apply suggestion

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2024-02-22 22:54:56 +08:00
Lucas.Xu c06a0346d8 chore: bump version 0.5.0 (#4700) 2024-02-22 10:22:33 +08:00
Richard Shiue 4a0c48f419 feat: bottom sheets with transition (#4608)
* feat: shiny new bottom sheets

* chore: code review
2024-02-22 09:54:54 +08:00
Lucas.Xu 7802c75d7c feat: support scaling text on mobile (#4690) 2024-02-22 09:50:24 +08:00
Richard Shiueandnathan f1831d07af chore: re-implement get_filter_by_field_id function (#4678)
* chore: remove inaccurate database view function

* chore: update collab rev

* chore: fix clippy

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-22 08:07:59 +08:00
Richard ShiueandNathan.fooo 6636731487 feat: checklist sort (#4659)
* refactor: use BoxAny for dynamically-typed cell changesets

* fix: rust-lib tests and clippy

* feat: enable sorting by checklist type option

* test: checklist sort rust-lib tests

* chore: update related tests

* fix: clippy

---------

Co-authored-by: Nathan.fooo <86001920+appflowy@users.noreply.github.com>
2024-02-22 08:00:59 +08:00
Richard Shiue a4a2a4088b refactor: use BoxAny for dynamically-typed cell changesets (#4655)
* refactor: use BoxAny for dynamically-typed cell changesets

* fix: rust-lib tests and clippy
2024-02-22 07:12:52 +08:00
Richard Shiue c500cd1287 refactor: improve type option filter logic (#4652) 2024-02-22 07:09:12 +08:00
Richard Shiue 6f173c2ada chore: adjust show mobile bottom sheet (#4689) 2024-02-21 21:06:46 +08:00
Richard Shiue 34fb1bcfa4 fix: disappearing sorts (#4691)
* chore: copy the field type

* chore: don't store field type in Sort

* fix: sorts disappearing
2024-02-21 20:01:57 +08:00
HY 58aa73b5be fix: resolve lexical ambiguity between "row" and "col" in zh-TW translation (#4683)
ref: https://terms.naer.edu.tw/detail/5e94c72b55cc73ebf81d71ca2b5d57e6/?seq=1
2024-02-20 22:40:03 +08:00
Richard Shiue 334aedd6c6 refactor: checkbox field type (#4682) 2024-02-20 14:02:32 +08:00
Richard Shiue a6c6aa819c fix: newly-created rows aren't being automatically sorted (#4661)
* fix: newly-created rows aren't being automatically sorted

* chore: new database view collab notification and add tests
2024-02-20 13:17:46 +08:00
Jayaprakash 15c9a67028 feat: implement outline block component depth control (#4642)
* feat: add support to control the depth of outline block component

* feat: update localization keys

* feat: add depth option to `BlockOptionButton`

* feat: retrive outline block heading components upto the depth level

* feat: add depth option config to editor configuration

* test: outline block depth control

* feat: add outline block placeholder

* refactor: remove redundant codes

* ci: trigger github actions

* chore: refactor `OptionDepthType` enum

* fix: flutter ci error

* refactor: removed `finalHeadingLevel` from outline keys

* fix: flutter ci error
2024-02-20 10:52:06 +08:00
Lucas.Xu 42cb032bca fix: flutter analyze (#4680) 2024-02-19 21:48:06 +08:00
Mathias Mogensen a3a5709b70 fix: dispose of previous applaunch tasks (#4631) 2024-02-19 21:32:01 +08:00
Ansah Mohammad 3a4247c304 feat: convert time format from HHmm to HH:mm in time field (#4641)
* feat: add a HHmm to HH:mm function

* fix: Replaced string.parse() with string.parseStrict() to address time input bug

* feat: add TextFormatter for formatting the time input
2024-02-19 21:30:28 +08:00
Sore 8eaadccda0 chore: add ckb-KUR translations (#4658)
* Create ckb-KUR.json

Add Translate (Kurdish-ckb Language)

* Update language.dart

i added ckb lang(kurdish).

* Update app_widget.dart
2024-02-19 17:43:01 +08:00
ArcesilasandLucas.Xu 2b6b10788d chore: update fr-FR and fr-CA translations (#4676)
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-02-19 17:25:00 +08:00
Lucas.Xu 26f8bbf7c6 feat: optimize image upload process and display an error message if upload fails (#4679)
* chore: optimize image upload

* feat: show upload image status

* chore: upload the ai image to cloud server
2024-02-19 17:24:47 +08:00
Lucas.Xu 252699d249 chore: upgrade to flutter 3.19.0 (#4677)
* chore: upgrade to flutter 3.19.0

* chore: adjust to the latest flutter convention

* chore: update CI flutter version

* fix: flutter analyze

* fix: flutter analyze

* fix: flutter analyze

* chore: fix docker build
2024-02-19 13:49:55 +08:00
Nathan.fooo b2e55c4e2e Fix: init state (#4672)
* chore: fix login state

* chore: change log

* chore: fix flutter version
2024-02-18 16:40:18 +08:00
Bastian Leichtandnathan d5ee372131 chore: update translations (#4615)
Co-authored-by: nathan <nathan@appflowy.io>
2024-02-18 07:36:23 +08:00
Arcesilasandnathan 39588a4731 chore: update translations (#4664)
Co-authored-by: nathan <nathan@appflowy.io>
2024-02-18 00:44:39 +08:00
HYandnathan 211559ed6e chore: Update translations for Traditional Chinese (#4662)
* chore: update zh-TW translations

* inlang: update translations

* inlang: update translations

* chore: update zh tw

* chore: update zh tw

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-18 00:40:22 +08:00
kosei a637517413 feat: update ja-JP translations (#4627) 2024-02-18 00:25:52 +08:00
Mathias Mogensen ddbe0fa698 fix: tauri build (#4669)
* ci: update workflows

* chore: add back translations used on web
2024-02-17 14:38:12 +01:00
TeddyFlink ee61ef3f12 feat: update translations (#4654) 2024-02-17 16:31:25 +08:00
PWandnathan 54bfc65664 feat: translate to traditional Chinese (#4505)
* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-17 16:28:10 +08:00
Richard Shiue c159a5e42b chore: enable number filter (#4653)
* chore: enable filtering by number field type

* chore: code cleanup

* fix: integration test

* chore: remove unnecessary async from event handler
2024-02-17 15:28:49 +08:00
Richard Shiue 1311e2d379 fix: build regression (#4667) 2024-02-17 14:42:01 +08:00
Hassam Sulehriaandjazima e6aa57275a feat: open emoji selection menu with keyboard short (#4133)
* feat: Implement emoji shortcut event (#2038)

* test: emoji shortcut integration test (#2038)

* test: Fixed testcase for emoji_shortcut_test (#2038)

* fix: remove _showEmojiPickerMenu (#4133)

* fix: change local variables with underscore

---------

Co-authored-by: jazima <jazim.a.29@gmail.com>
2024-02-16 18:47:23 +01:00
Danilo Barion Nogueiraandnathan d690ca2751 chore: update translations (#4270)
Co-authored-by: nathan <nathan@appflowy.io>
2024-02-17 01:44:05 +08:00
Richard Shiue 3e0a003872 fix: deleting a sort doesn't allow creating a new sort on that field (#4660) 2024-02-16 13:39:49 +08:00
Nathan.fooo e81a2ff577 fix: token refresh on local (#4650)
* fix: refresh user token on local

* chore: add test
2024-02-14 09:38:05 +08:00
Mathias Mogensen b356927e60 feat: improve more action in document (#4639) 2024-02-09 15:54:05 +01:00
Mathias Mogensen 1894409dc3 ci: resolve mobile build failing due to missing space (#4640)
* chore: remove additionally unused tools

* chore: test

* chore: bunch cleanup commands
2024-02-09 14:40:06 +01:00
nathan f29f1bae32 chore: update error message 2024-02-09 10:18:52 +08:00
Nathan.fooo 45054e7639 chore: bump version 047 (#4635) 2024-02-09 00:18:51 +08:00
Nathan.fooo 3b51a6e6be chore: reload workspace when fail to load at the first time (#4633)
* chore: reload workspace when fail to load at the first time

* fix: clippy

* chore: update client api

* chore: fix wasm build

* chore: fix test
2024-02-08 23:53:05 +08:00
Ansah Mohammad 747fe40648 feat: toggle favourites from the documents top bar. (#4382)
* feat: init star button

* feat: implemented star button on the right bar

* feat: Implemented toggle logic

* chore: Added ToolTip for favorite button

* refactor: renamed star to favorite

* refactor: moved appplication logic into favorite_cubit

* chore: arranged imports in alphabetical order

* refactor: reused favorite_bloc for toggle

* fix: fixed the icon no rebuild

* refactor: moved the FavoriteBloc higher in the widget tree

* refactor: moved FavoriteBloc inside multiBlocProvider of desktop_home_screen

* chore: specified bloc type

* chore: cleaned code

* refactor: use any instead of map
2024-02-08 10:45:54 +01:00
Kilu.He 60fc5bb2c8 fix: tauri folder bugs (#4589) 2024-02-08 14:22:44 +08:00
Mathias Mogensen 9d71464f1a fix: select name by default (#4630) 2024-02-07 21:49:17 +01:00
Mathias Mogensen 92ceb2cd7d fix: dispose of resources in time (#4625)
* fix: limit length when renaming views

* chore: clean up database listeners

* fix: dispose of controllers properly

* fix: dispose of resources properly

* fix: deleting filters with same name

* chore: extend DatabaseTabBarItemBuilder

* fix: null check on null value
2024-02-07 18:38:53 +01:00
Richard Shiue 0db21b91a3 fix: unequal grid header and body widths (#4626) 2024-02-07 17:49:53 +01:00
Richard Shiue 88e9d63a13 fix: show newChecklistTask on hover over entire list item in row detail page (#4622) 2024-02-07 23:20:26 +08:00
Mathias Mogensen 3129fa6cc1 fix: use cmd+. to toggle sidebar on macOS (#4621)
* fix: use cmd+. to hide sidebar on macOS

* fix: update missed tooltip
2024-02-07 12:18:13 +08:00
Mathias Mogensen db5372c18e feat: hotkey to open settings dialog (#4620)
* feat: hotkey to open settings dialog

* chore: change to cmd/ctrl+,
2024-02-07 12:17:48 +08:00
Richard Shiue b781c9aa0f fix: deleting a sorting field doesn't delete existing sorts (#4611) 2024-02-07 10:47:17 +08:00
Richard Shiue a9c6b80f4a chore: add spacing between field buttons in setting popover (#4612) 2024-02-07 10:46:36 +08:00
Lucas.Xu 271f781cce fix: application will raise an error when selecting unsplash image in local mode (#4604) 2024-02-05 21:53:14 +07:00
Richard Shiue ef4bce25d8 feat: sort by last modified time or created time (#4601) 2024-02-05 21:54:42 +08:00
ansizheshi 95c4cb241a chore: update zh-CN translations (#4599) 2024-02-05 17:39:45 +08:00
Dorian Péron e20d938ce3 chore: update translations (#4581) 2024-02-05 16:53:18 +08:00
Richard Shiue a515715543 feat: reorder sort precedence (#4592)
* feat: reorder sorts

* chore: add tests, fix tests, fix tauri build and fix clippy

* fix: add missing import
2024-02-05 13:52:59 +08:00
Nathan.fooo fda70ff560 feat: folder web (#4580)
* chore: folder wasm

* chore: folder wasm

* chore: resolve deps

* chore: fix trait

* chore: try localset

* chore: fix

* chore: fix

* chore: fix

* chore: async init sdk

* chore: fix test

* chore: fix test
2024-02-04 05:50:23 +08:00
Zackandnathan 08938b8c70 feat: cloud workspace api (#4469)
* feat: workspace api

* feat: added cloud apis for add and delete workspace

* feat: add and delete workspace event handlers

* chore: rust fmt

* chore: save user workspace

* test: add test

* test: add test

* chore: add to gitignore

* feat: update api add name to workspace

* chore: cargo clippy and rename to create

* chore: add envrc and direnv to gitignore

* chore: change name to create workspace instead of add workspace

* chore: update client api rev

* feat: add create workspace impl

* chore: restore gitignore to original

* test: fix create workspace event test

* fix: change delete workspace input

* fix: compile

* fix: create workspace test

* feat: add error code for request payload too large

* chore: remove cargo backup files

* feat: add is async option for upload file handler

* chore: update client api version

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-04 05:49:45 +08:00
Richard Shiueandnathan 250f29f325 chore: clean up sort and filter code (#4585)
* refactor: port away from extra SortType struct

* refactor: add validator to flowy_database and clean up unused structs

* refactor: port away from extra FilterType struct

* chore: analysis options

* fix: clippy and dart/ts compile

* fix: tauri build

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-04 05:49:28 +08:00
Yijing Huang d117cd6b5b chore: delete placeholder code and clean code (#4503) 2024-02-04 00:56:50 +08:00
Richard Shiue ca93cb20ec chore: revamp mobile database toolbar (#4579)
* chore: revamp mobile database toolbar

* chore: code cleanup
2024-02-04 00:55:44 +08:00
Richard Shiue 8c1d0106dd chore: inkwell mobile quick action sheets (#4576)
* chore: inkwell mobile quick action sheets

* chore: more subtle tap effect

* chore: improve code style
2024-02-04 00:55:05 +08:00
Mathias Mogensenandnathan 5cbc8b1e18 feat: calculations (#4473)
* feat: initial calculation controller

* fix: entities

* feat: calculations

* fix: review comments and support floats

* fix: abstract business logic into calculations service

* fix: clean calculation entities after merge

* feat: react to changes to row/cell/field_type

* chore: changes after merging main

* feat: handle delete field

* test: add grid calculations tests

* fix: add validation + format numbers

* refactor: get cell number

* chore: bump collab

* chore: fix clippy

* chore: update docs

* chore: update docs

* chore: fmt

* chore: fix flutter

* chore: collab rev

* fix: cleanup and hover to show

* fix: localization

* test: add basic rust test

* fix: clippy

* fix: support updating calculation on duplicate row

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-02-04 00:52:38 +08:00
Nathan.fooo 274742e334 chore: bump version v0.4.6 (#4595)
* chore: bump version

* chore: bump client api version
2024-02-03 19:45:46 +08:00
Lucas.Xu 792f56db79 chore: remove unused build and add build bot (#4586) 2024-02-02 17:42:23 +08:00
nathan 458d3f971b chore: bump client api 2024-02-02 09:35:55 +08:00
Nathan.fooo 2ffd6bf7ea chore: bump version (#4583) 2024-02-02 09:30:27 +08:00
Nathan.fooo 722691c922 chore: fix ws conn (#4582)
* chore: fix ws conn

* chore: flutter analyzer

* chore: update client api
2024-02-02 09:27:11 +08:00
Kilu.He 9746852b5f fix: fixed editor bugs (#4552)
* fix: fixed editor bugs

* fix: add error boundary
2024-02-02 05:47:41 +08:00
Lucas.Xu 5b030303a6 fix: appimage build (#4578)
* chore: force exec flutter package pub get

* feat: support building appimage on github ci
2024-02-01 20:58:58 +08:00
XiaoFans 1e4f342fc3 chore: update translations (#4577) 2024-02-01 20:53:49 +08:00
Richard Shiue 4f0379bdd7 fix: size of hitbox in app bar button (#4575) 2024-02-01 20:53:21 +08:00
Lucas.Xu ce261c9128 fix: keyboard not show automatically (#4572) 2024-02-01 15:41:14 +08:00
Richard Shiue 20391bfec4 chore: revamp database setting action sheets (#4570)
* chore: revamp database setting action sheets

* chore: field picker improvement

* chore: fix comments
2024-02-01 15:41:02 +08:00
Richard Shiue 9d28360887 fix: mobile ui improv and bugs (#4567)
* fix: quick edit field bottom sheet header

* fix: field editor appbar regression

This stems from moving to a standardized FlowyAppBar
2024-02-01 10:27:03 +08:00
Lucas.Xu 99f9cb2a09 chore: bump version 0.4.4 (#4566) 2024-01-31 22:37:04 +08:00
Mathias MogensenandLucas.Xu 247405ff51 fix: launch review reminder (#4514)
* fix: dismiss menu on enter on no result

* fix: add drag handle to mobile reminder dialog

* fix: show reminder icon  in date cell in grid

* fix: auto select day when selecting reminder

* fix: increase height of notification hub

* fix: let some reminder options require time and show time

* fix: handling of non-time reminder options

* test: fix edit date time cell test

* fix: close popover when pressing child again

* fix: add time of now when setting include time

* fix: clean logic

* fix: tests

* fix: add test and include time in notification hub

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-31 21:17:36 +08:00
Nguyễn Thái Lâm d27e2179cc chore: update vietnamese translations (#4536) 2024-01-31 21:16:39 +08:00
indar 100cc19747 chore: update translations id-ID (#4548) 2024-01-31 21:16:11 +08:00
Richard Shiue fa66a119ed fix: mobile UI issues (#4561)
* fix: don't re-request focus after editing a cell

* fix: card detail more actions

* fix: select option indicators

* fix: add field bottom sheet revamp

* fix: edit field type bottom sheet

* chore: bump spacing between header and first row of field types

* fix: grid spacing

* refactor: use svg and background colors

* refactor: use shared component
2024-01-31 21:15:38 +08:00
Lucas.Xu a9787546b4 chore: update add block menu icons (#4565) 2024-01-31 21:15:23 +08:00
Peter Dave Hello 5cbe90c79f chore: further improve and update zh-TW translation (#4558)
This is a follow up of #4345, to continue improve the translation
quality, as the original translation was more Simplified-Chinese, and
there are also some new strings need to be translated.
2024-01-31 20:17:35 +08:00
Lucas.Xu a143a030a9 feat: reafactor add block menu (#4563) 2024-01-31 17:47:02 +08:00
Richard Shiue caede19267 chore: get rid of space in code block of readme (#4547) 2024-01-31 10:47:51 +08:00
Lucas.Xu d410ffbaa8 feat: support exporting log files (#4559)
* feat: support exporting log files

* feat: support uploading log files on Android
2024-01-31 10:07:50 +08:00
Nathan.foooandRichard Shiue 0483e305e7 chore: rename (#4551)
Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2024-01-31 00:43:55 +08:00
Lucas.Xu f6242f1cc7 feat: add signout dialog (#4557) 2024-01-31 00:40:52 +08:00
Richard Shiue 18c7fff34b refactor: clean up select type option logic (#4554) 2024-01-30 23:20:11 +08:00
Lucas.Xu 792573f46d feat: optimize image block (#4553)
* feat: add tooltip for maximum image size

* feat: add maximum upload image size tooltip

* feat: limit image size to 10MB

* fix: disable copy link option for cloud image

* fix: disable copy link option for cloud image

* feat: use regex to match the appflowy.cloud image
2024-01-30 22:39:42 +08:00
Lucas.Xu e9d7d0b7b3 fix: incorrect background color using in view action menu (#4513) 2024-01-30 16:07:51 +08:00
Lucas.Xu 0b7ae734a1 fix: potential dependency conflict (#4550)
* fix: potential dependency conflict

* fix: ci issues
2024-01-30 16:05:56 +08:00
Nathan.fooo c0aef8f4fe fix: login issue (#4546)
* fix: reset server url when using appflowy cloud the first time

* refactor: set authenticator in frontend

* chore: log version

* chore: show hint when changing the server type

* chore: bump version

* chore: fix test

* chore: bump collab
2024-01-30 09:33:34 +08:00
Nathan.fooo 55c97b56a3 feat: calling user event from web (#4535)
* refactor: user manager

* refactor: user manager

* refactor: session location

* refactor: user manager

* chore: gen ts files

* feat: implement indexeddb persistence

* chore: integrate user manager

* chore: update

* chore: run on web thread

* chore: run on web thread

* chore: fix test

* chore: add test

* chore: add test

* chore: add user & sign in with password

* chore: fix test

* chore: update docs

* chore: fix warnings

* chore: gen files

* chore: add user

* chore: add files

* chore: update config

* chore: update scirpt

* chore: update scirpt

* fix: build

* chore: update command

* fix: ci

* ci: fix

* fix: compile

* fix: compile

* fix: ci

* fix: compile

* fix: tauri build

* chore: fix test

* chore: fix test
2024-01-30 05:36:27 +08:00
Mathias Mogensen 86a0569d84 feat: f2 to rename current view (#4522)
* feat: cmd+shift+r to rename current view

* test: change cmd to f2 and add test

* chore: code review

* fix: unawaited future
2024-01-29 20:55:37 +01:00
Lucas.Xu 5b3b0e54d9 feat: refactor app bar (#4539)
* feat: refactor appbar

* fix: flutter analyze
2024-01-29 23:13:06 +08:00
Lucas.Xu f1e380c276 fix: add more padding in bottom sheet widget (#4542) 2024-01-29 23:12:56 +08:00
Mathias Mogensen ea93f0e141 fix: idiomatic dow can be 1 character (#4543) 2024-01-29 13:10:47 +01:00
Abhijeet SinghandLucas.Xu c1433ce38a chore: update translations (#4510)
* Update es-VE.json

* inlang: update translations

* Delete project.inlang/project_id

* inlang: update translations

* Delete project.inlang directory

* Create settings.json

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

* inlang: update translations

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-29 17:33:58 +08:00
XiaoFansandLucas.Xu 831586293e chore: update Chinese translations (#4521)
* inlang: update translations

* Revert "inlang: update translations"

This reverts commit a6e1d945c1.

* chore: update Chinese translations

The translation this time is tailored to the reading habits of Chinese readers, correcting some machine-translated content. Additionally, I have included some content that was not translated before.

* chore: update frontend/resources/translations/zh-CN.json

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-29 17:28:47 +08:00
Richard Shiue 5c5b6d02e8 fix: don't show ungrouped column when the field type is checkbox (#4538) 2024-01-29 17:27:59 +08:00
Lucas.Xu 8937856d36 feat: new UI design for number format list (#4537) 2024-01-29 16:34:19 +08:00
Richard Shiue 63c22feb8f fix: mobile field editing related bugs (#4534)
* fix: mobile field editing related bugs

* chore: review

* chore: restore podfile.lock
2024-01-29 13:19:35 +08:00
Richard Shiue 05a06980b9 chore: add unwaited futures to analysis options (#4485) 2024-01-29 10:26:45 +08:00
Lucas.Xu 7be29c04a2 fix: unable to delete image and refactor image actions menu (#4525)
* feat: refacotr image block action

* fix: unable to delete the image placeholder

* fix: unable to delete the image placeholder
2024-01-29 10:15:48 +08:00
Lucas.Xu 5a9a1e60e6 fix: bottom sheet issues (#4523)
* fix: bottom sheet padding

* fix: set divider width to 0.5px

* feat: optimize number select menu

* chore: update edit field icons

* chore: use short form in add block menu

* feat: optimize select and multi-select menu

* feat: refactor font settings page, theme mode menu and rtl menu
2024-01-28 22:50:25 +08:00
Richard Shiue 4811e65efa chore: reorganize cell code (#4516)
* chore: move cell bloc files to application

* chore: move cell editor widgets to its own folder
2024-01-27 10:57:09 +08:00
Lucas.Xu 72a23bfe82 feat: update recentViews list to only keep the first 20 items (#4512) 2024-01-26 22:35:33 +08:00
Lucas.Xu ed78cb4efc fix: the items in database field menu are not aligned (#4511)
* fix: title in settings page overflow

* fix: the icon and text in database field menu aren't aligned

* fix: the icon and text in database field menu aren't aligned
2024-01-26 22:35:16 +08:00
Richard Shiue d2cc799861 fix: mobile row detail title not being updated (#4507) 2024-01-26 22:23:59 +08:00
Richard Shiue 2e7a97c8a2 chore: enable timestamp field on mobile (#4506) 2024-01-26 22:23:47 +08:00
Lucas.Xu 64cd7d41ca fix: the text and icon in + menu are not aligned in the same baseline (#4500) 2024-01-26 10:06:49 +08:00
Lucas.Xu 0e3ffa8fd5 feat: action sheet revamp (#4497) 2024-01-26 00:33:45 +08:00
Lucas.Xu be00980fdd chore: optimize android UI (#4498) 2024-01-26 00:24:33 +08:00
Abhijeet Singh 7fbaf204ef chore: update translations (#4493) 2024-01-25 23:46:42 +08:00
Mathias Mogensen acc03b8cc4 chore: code cleanup according to unintroduced lints (#4488)
* chore: remove redundant arguments

* chore: remove unused constructor params

* chore: reorganize constructors

* chore: remove unnecessary awaits in returns

* chore: remove unnecessary paranthesis

* chore: add lints

* chore: clean up after merge

* chore: add sort constructors first

* chore: organize constructors in blocs

* chore: use sizedbox.shrink over empty container
2024-01-25 23:37:36 +08:00
Richard Shiue 747abba87f fix(mobile): remove elevation from edit field page and remove inksplash in card detail if disabled (#4491) 2024-01-25 13:20:48 +08:00
Richard Shiue e88fb533c8 fix: composing in select option text field doesn't work (#4470)
* fix: composing in select option text field doesn't work

* style: improve code style
2024-01-25 13:17:13 +08:00
Richard Shiue 3f896ad64f chore: reorganize code (#4490)
* rename select_option.rs to select_option_entities.rs

* move checklist_filter.rs from select_type_option to checklist_type_option
2024-01-25 12:56:43 +08:00
Richard Shiue 6591d5de52 chore: dart code cleanup (#4484)
* chore: use when instead of map in bloc event dispatch

* chore: dart code formatting, remove white space

* chore: remove unneeded hashmap for cell context

* fix: rebuild card content
2024-01-25 12:26:18 +08:00
Richard Shiue a1abcd7626 refactor: database cell controller and builder (#4398)
* refactor: get row/field data from row cache and field controller in cell controller

* refactor: reorganize cell controller tasks and builder

* refactor: rename cell_builder.dart

* refactor: database editable cell builder

* refactor: database card cell builder

* fix: make it work

* fix: start cell listener and adjust cell style on desktop

* fix: build card cell

* fix: remove unnecessary await in tests

* fix: cell cache validation

* fix: row detail banner bugs

* fix: row detail field doesn't update

* fix: calendar event card

* test: fix integration tests

* fix: adjust cell builders to fix cell controller getting disposed

* chore: code review

* fix: bugs on mobile

* test: add grid header integration tests

* test: suppress warnings, reduce flaky test and group tests
2024-01-24 23:59:45 +08:00
Abhijeet Singh 18a355601a chore: update translations (#4481) 2024-01-24 22:46:11 +08:00
Lucas.Xu c2fdfb6e89 fix: font shown in AA has _r as a suffix (#4482) 2024-01-24 22:45:13 +08:00
Mathias Mogensen baa7c8d826 feat: reminder on date (#4288)
* feat: support reminder on date

* feat: support reminder on date in database

* fix: include time static

* fix: do not force unwrap

* chore: clean flutter code

* test: add test for reminder in database

* fix: interpret reminder option

* feat: date and reminder on mobile

* feat: improve notification actions and support open row

* feat: support dates in document

* fix: minor changes + review

* feat: support reminder on mobile in document

* feat: support open row on database reminder mobile

* test: add more tests

* fix: first part of review

* fix: open row responsibility

* fix: abstract application logic from presentation layer

* fix: update reminder on date cell update

* test: fix failing test

* fix: show correct selected day after end date toggled
2024-01-24 15:15:57 +01:00
Mathias Mogensen 8105da1c2b Fix: mobile improvements (#4480)
* fix: copy on notifications screen is caught off

* fix: mobile event screen no events copy

* fix: hide notifications toggle from settings

* fix: cannot change type of field in grid
2024-01-24 12:07:02 +01:00
Lucas.Xu 827e41348b feat: keep the offset of the recent section (#4466) 2024-01-23 16:54:04 +08:00
Lucas.Xu e239ba46aa feat: customize self host url on launch page (#4465) 2024-01-23 16:38:15 +08:00
Lucas.Xu 2554ba81b5 feat: optimize cloud settings on mobile (#4444) 2024-01-23 01:37:02 +08:00
Nathan.fooo 84d171b1db chore: bump client api to fix user session issue (#4445) 2024-01-23 01:33:52 +08:00
Lucas.Xu 38902ed599 feat: enable anonymous sign in on mobile (#4442)
* feat: enable anoymous login on mobile

* feat: support signin with third party serices
2024-01-22 22:36:16 +08:00
Lucas.Xu 2cdee386c2 chore: add zip package for Windows (#4441) 2024-01-22 22:36:07 +08:00
Nathan.fooo 90516b6adc feat: wasm build (#4412)
* chore: enable wasm build

* chore: bump collab

* chore: fix build

* chore: flowy-document wasm

* chore: fix compile

* chore: fix compile

* chore: fix compile

* chore: fix compile

* chore: fix ci

* chore: fix ci

* chore: fix ci
2024-01-22 13:34:15 +08:00
Lucas.Xu c4acba8216 fix: mobile sign-in issue (#4424)
* Revert "chore: remove zip package for windows and macOS (#4404)"

This reverts commit f612d9b701.

* Revert "chore: remove zip package for windows and macOS (#4404)"

This reverts commit f612d9b701.

* fix: mobile signin
2024-01-21 21:47:14 +08:00
Continy 4404e0d727 chore: update translations (#4428)
* inlang: update translations

* inlang: update translations

* inlang: update translations
2024-01-20 23:24:10 +08:00
Abhijeet SinghandLucas.Xu 48c6c635f7 chore: update translations (#4406)
* Update es-VE.json

* inlang: update translations

* Delete project.inlang/project_id

* inlang: update translations

* Delete project.inlang directory

* Create settings.json

* inlang: update translations

* inlang: update translations

* inlang: update translations

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-20 23:23:44 +08:00
Zsombor 332f40c915 choreL: update Hungarian translations (#4416) 2024-01-20 23:22:33 +08:00
Lecanora 2b32f0eff0 chore: update french translations for inlang (#4419) 2024-01-20 23:21:47 +08:00
Juliano Penna 7d20ca5a77 fix: print correct package name (#4425) 2024-01-20 23:18:50 +08:00
0a0f2adf76 feat: support uploading image to cloud storage (#4413)
* feat: add object ext

* feat: integrate upload image api

* feat: support uploading local file to cloud

* feat: abstact the CachedNetworkImage as FlowyNetworkImage

* ci: fix tauri ci

* fix: integration test

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Co-authored-by: nathan <nathan@appflowy.io>
2024-01-20 23:16:18 +08:00
Richard Shiue 4852e5c8d4 fix: don't parse unexpected files while generating protobuf (#4411) 2024-01-17 11:20:02 +08:00
Nathan.fooo 65f1db776b chore: bump version 043 (#4409) 2024-01-17 05:55:47 +08:00
Zackandnathan 38c3e700e9 feat: initial file upload api (#4299)
* feat: initial file upload api

* feat: initial file upload api

* fix: add pb index

* feat: remove file name

* feat: read everything to mem

* feat: revamp object storage

* chore: cargo format

* chore: update deps

* feat: revised implementations and style

* chore: use deploy env instead

* chore: use deploy env instead

* chore: use deploy env instead

* refactor: move logic to handler to manager

* fix: format issues

* fix: cargo clippy

* chore: cargo check tauri

* fix: debug docker integration test

* fix: debug docker integration test

* fix: debug docker integration test gotrue

* fix: debug docker integration test docker compose version

* fix: docker scripts

* fix: cargo fmt

* fix: add sleep after docker compose up

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-01-17 02:59:15 +08:00
Abhijeet Singh 15cb1b5f19 chore: update translations (#4395) 2024-01-16 15:32:04 +08:00
Lucas.Xu 1bf1d03676 chore: set minimum supported android version to android 10 (#4402) 2024-01-16 15:31:27 +08:00
Lucas.Xu f612d9b701 chore: remove zip package for windows and macOS (#4404) 2024-01-16 14:13:40 +08:00
Lucas.Xu 595f1f6ef8 chore: use openai default model (#4368)
* chore: use openai default model

* feat: update openai mode
2024-01-15 16:26:45 +08:00
Lucas.Xu c8e9adb81d fix: unable to use slide gesture to close keyboard (#4391) 2024-01-15 16:26:37 +08:00
Lucas.Xu 6d3a7545a6 chore: update editor version (#4392) 2024-01-15 16:26:27 +08:00
Lucas.Xu 6739af2be1 fix: the aa menu disappear after clicking the inactive indent itemg (#4390) 2024-01-15 15:39:04 +08:00
Nathan.fooo c41a7aaacf chore: support localhost and development mode (#4384)
* chore: update local port for development

* chore: support localhost development

* chore: fix rust test

* chore: update setting

* fix: ci

* fix: ci

* fix: ci

* fix: ci

* chore: fix docker build

* chore: fix ci
2024-01-15 12:53:53 +08:00
ilyes-cedandLucas.Xu d200c409d6 fix: removed space under grid (#4352)
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-14 22:56:11 +08:00
Lucas.Xu cd28dee7bd chore: bump new version (#4374) 2024-01-14 22:55:17 +08:00
Yijing Huang 7e82a08b54 fix: secondary button outline color (#4381)
* chore: restore the default outline color in SecondaryButton

* chore: improve outline color for learn more button
2024-01-14 22:54:59 +08:00
Jia Hang f0bd50b246 fix: change copyright year to 2024 (#4379) 2024-01-14 22:54:31 +08:00
ferreira-fp e571eb9881 chore: update translations (#4370) 2024-01-14 22:54:10 +08:00
Nathan.fooo c4f4bcf457 feat: using appflowy cloud as the default cloud type (#4380)
* feat: using appflowy cloud as the default cloud type

* fix: test

* Update cloud_env.dart
2024-01-13 03:08:07 +08:00
Nathan.fooo 9500abb363 feat: workspace service in user crate (#4373)
* refactor: user manager

* feat: implement workspace service

* refactor: migrate user data when sign up

* chore: fmt

* chore: enable beta cloud

* chore: update ci

* chore: trim slash
2024-01-12 14:34:59 +08:00
Lucas.Xu 690a3746fa feat: optimize the align toolbar item (#4364) 2024-01-12 10:18:52 +08:00
Nathan.fooo cd82c13753 feat: Stream collab objects (#4361)
* feat: stream collab object

* chore: disable snapshot
2024-01-12 06:26:43 +08:00
Lucas.Xu 032a648204 chore: reduce package size (#4353) 2024-01-11 21:45:20 +08:00
Abhijeet Singh f64ee912d0 chore: update translations (#4354) 2024-01-11 21:45:07 +08:00
Nathan.fooo 307556b7dd refactor: deps crates (#4362)
* refactor: rename flowy-folder-deps to flowy-folder-pub

* chore: rename crates

* chore: move flowy-task to lib-infra

* chore: rename crates

* refactor: user manager dir
2024-01-11 14:42:03 +08:00
Lucas.Xu dd8b9dd43e fix: unable to get the device info in test mode (#4359) 2024-01-11 14:26:25 +08:00
Nathan.foooandMathias Mogensen 6e41359fc5 feat: show indicator when importing appflowy data (#4357)
* feat: show indicator when importing appflowy data

* Update frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/setting_file_import_appflowy_data_view.dart

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

* chore: fix analyzer

* chore: fix test

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2024-01-11 09:44:33 +08:00
Yijing Huang b1cc4e485b fix: upload custom theme issue (#4317)
* fix: FlowyDynamicPlugin encode issue

* chore: improve the default theme color

* fix: learn more button text invisiable

* fix: fix read the wrong theme mode file

* fix: prevent current custom theme being deleted

* chore: improve theme upload UI and error prompts

* chore: delete unnecessary LocaleKeys
2024-01-10 21:21:05 +08:00
Kilu.He 239bf2fa70 refactor: adjust tauri codes (#4332)
* fix: some bugs

* refactor: delete code that is no longer needed
2024-01-10 19:24:40 +08:00
Peter Dave Hello a6baabbafc chore: improve zh-TW translation (#4345) 2024-01-10 18:48:05 +08:00
Nathan.fooo a954b5ffd8 fix: create offline document (#4350) 2024-01-10 18:43:13 +08:00
Lucas.Xu 36b88c602c feat: update privacy policy and add version code (#4343) 2024-01-10 18:42:33 +08:00
Nathan.fooo 190fae196f chore: bump collab (#4348)
* chore: bump collab

* chore: optimize import

* chore: bump

* chore: disable ai test
2024-01-10 11:15:05 +08:00
Jayaprakash 347698f68f feat: support aligning the text block using shortcuts (#4319) 2024-01-09 20:27:08 +07:00
Lucas.Xu db2e23172a feat: support canceling the sign-in event (#4342) 2024-01-09 17:09:44 +08:00
Lucas.Xu dcb070909c feat: support RTL layout on mobile (#4335)
* feat: revamp theme mode settings

* feat: support RTL layout on mobile
2024-01-09 10:12:54 +08:00
Mathias Mogensen 332a677d20 feat: improve reference menus (#4301)
* feat: improve reference menus

* fix: limit page results in reference menus

* fix: custom title for specific type refs

* fix: insert pages

* fix: enable scrolling on item focus change

* fix: enable shift+tab to navigate

* fix: properly offset menu

* fix: review comments

* fix: remove bottom padding on last group
2024-01-08 15:28:36 +01:00
trattaa 75d394fb6e chore: update translations (#4320) 2024-01-08 15:34:25 +08:00
Lucas.Xu 875b9d6cfc feat: improve mobile touch gesture experience (#4328) 2024-01-08 15:06:59 +08:00
occhiodipesce e9326d49c0 chore: update it-IT translations (#4325)
* inlang: update translations

* inlang: update translations
2024-01-08 10:11:36 +08:00
Nathan.fooo 4ee6e297c6 chore: bump collab (#4327) 2024-01-08 08:21:57 +08:00
Richard Shiue c4ebccafd4 fix: adjust select option button hover and padding (#4323) 2024-01-07 21:16:48 +08:00
Richard Shiue 94bdefbf01 chore: update .gitignore (#4324) 2024-01-07 21:16:38 +08:00
Nathan.fooo ba482a30a3 chore: recreate snapshot table & remove old data (#4322)
* chore: recreate snapshot table & remove old data

* chore: disable test

* chore: fmt
2024-01-07 13:59:39 +08:00
Nathan.fooo 76416cfdba test: Import folder test (#4321)
* fix: import old version appflowy data

* chore: add 037 test

* chore: add default appflowy cloud url

* chore: bump collab
2024-01-07 11:12:05 +08:00
Nathan.fooo 2557e4f3cc chore: using zstd as collab_db compression method and Deflated as zip file compression method (#4318) 2024-01-06 12:46:11 +08:00
Kilu.Heandnathan 79c912219d feat: appflowy_web build (#4302)
* chore: create web folder

* fix: support lib-dispatch and notification compiling to wasm

* refactor: wasm

* refactor: call async evnet

* chore: add web ci

* ci: fix

* ci: fix

* ci: fix

---------

Co-authored-by: nathan <nathan@appflowy.io>
2024-01-06 11:50:05 +08:00
Nathan.fooo 89370b4a55 chore: lib-dispatch wasm build (#4307)
* chore: lib-dispatch wasm build

* chore: add wasm crate

* chore: add wasm demo

* chore: fix test
2024-01-06 00:37:26 +08:00
Baraa Al-Masri ecbc2601c4 chore: update ar-SA translations (#4131)
* chore: update translations from inlang

* Resync translations from upstream
2024-01-06 00:34:40 +08:00
TasseDo f3753435e6 chore: update fr-FR and fr-CA translations (#4305)
* inlang: update translations

* inlang: update translations
2024-01-05 21:21:57 +08:00
Richard Shiue 1eeb812a1c refactor: rename database code path from database_view to database (#4310) 2024-01-05 17:30:54 +08:00
Lucas.Xu 6dba118413 fix: macos universal build (#4311) 2024-01-05 15:28:47 +08:00
Richard Shiue ee7fc5d77d fix: number field editor full height (#4308) 2024-01-05 12:21:51 +08:00
Nathan.fooo e7533c149f chore: bump client api (#4306) 2024-01-05 11:49:28 +08:00
maTh bdec917a35 chore: update de-DE translations (#4272)
* fix: labels from bottom of list started to translate

* fix: finished the last labels

* fix: Comma

* fix: typo

* fix: better wording for forstDayOfWeek

* fix: better wording for incluceTime
2024-01-05 11:13:54 +08:00
Abhijeet SinghandLucas.Xu 76a3daecaf chore: update es-VE translations (#4267)
* Update es-VE.json

* inlang: update translations

* Delete project.inlang/project_id

* inlang: update translations

* Delete project.inlang directory

* Create settings.json

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-05 11:09:02 +08:00
Nathan.fooo ed1952d6a9 chore: bump client api (#4303) 2024-01-05 06:12:21 +08:00
Nathan.fooo 5a87229fe9 chore: Collab wasm build (#4297)
* fix: ci

* fix: ci

* fix: build

* chore: bump collab
2024-01-05 00:05:38 +08:00
Nathan.fooo eac878d563 fix: import document from database row (#4295)
* fix: import document from database row

* chore: update test

* chore: fix test

* chore: fix test

* chore: fix test

* chore: fix local user on appflowy cloud error

* chore: clippy

* chore: bump pubspec version
2024-01-04 08:02:12 +08:00
Nathan.fooo de08c01c4c chore: bump version (#4294)
* chore: bump version

* chore: bump version
2024-01-03 12:35:26 +08:00
Nathan.fooo 7937fd1f3a fix: 040 bugs (#4285)
* test: add tests

* chore: set maximum log files

* fix: import row document

* chore: bump client api

* chore: fix analyzer

* chore: fix flutter unit test
2024-01-03 11:41:29 +08:00
maTh eef5c2bf66 fix: more labels translated to German and improved (#4261) 2024-01-01 13:33:28 +08:00
dependabot[bot] 9c769cd7e5 chore: bump @babel/traverse in /frontend/appflowy_tauri (#4260)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.5 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-31 13:42:43 +08:00
dependabot[bot] eac58dc212 chore: bump @tauri-apps/cli in /frontend/appflowy_tauri (#4263)
Bumps [@tauri-apps/cli](https://github.com/tauri-apps/tauri) from 1.3.1 to 1.5.6.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/cli.js-v1.3.1...@tauri-apps/cli-v1.5.6)

---
updated-dependencies:
- dependency-name: "@tauri-apps/cli"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-31 13:42:11 +08:00
nathan d3241cdecb chore: update changelog 2023-12-31 13:41:17 +08:00
Lucas.Xu 857f645131 fix: windows package output path (#4265) 2023-12-31 11:54:55 +08:00
Nathan.fooo 2521611d6a chore: bump sqlite system deps (#4262)
* chore: bump sqlite system deps

* chore: bump open ssl

* chore: fix clippy

* chore: remove unused deps

* chore: fix test
2023-12-31 10:23:43 +08:00
Nathan.fooo 5facb61e23 refactor: crates (#4258)
* chore: rename flowy-folder2 to flowy-folder

* chore: rename flowy-document2 to flowy-document

* chore: fix test

* chore: move lib-infra crate

* chore: remove shared-lib

* chore: fix clippy
2023-12-31 07:29:40 +08:00
Lucas.Xu 2f6a4f8c7b chore: adjust flutter windows release path (#4257) 2023-12-31 02:23:27 +08:00
Lucas.Xu 84b8b92582 chore: upgrade flutter dependencies (#4256) 2023-12-30 22:23:01 +08:00
Lucas.Xu 827d7c381e chore: bump version 0.4.0 (#4255) 2023-12-30 15:52:09 +08:00
maTh b0bf99da34 fix: more labels to German translated and improved (#4248) 2023-12-30 15:49:09 +08:00
Yijing Huang ca50e56474 chore: update fontFamily in button theme (#4251) 2023-12-30 15:48:20 +08:00
Nathan.fooo 36cf653d64 chore: support import appflowy data into current workspace (#4254)
* chore: support import appflowy data into current workspace

* refactor: code

* chore: unused ref

* chore: update url
2023-12-30 13:44:09 +08:00
Nathan.fooo 8ccd1ec72c chore: remove anon user when sign up with a new user (#4253)
* chore: remove anon user when sign up with a new user

* chore: clippy
2023-12-30 09:36:22 +08:00
Nathan.fooo 7ba3020ab3 chore: skip create sync plugin when the authenticator for given user … (#4252)
* chore: skip create sync plugin when the authenticator for given user is local

* chore: bump collab
2023-12-30 07:05:26 +08:00
Nathan.fooo 50694bb589 chore: support Rust 1.75 (#4246)
* chore: fix wanrings

* chore: update rust version
2023-12-30 01:22:06 +08:00
Nathan.fooo 206ccb2c43 fix: supabase sync (#4243)
* chore: fix supabse sync

* chore: bump collab

* chore: fmt

* chore: remove unused key
2023-12-29 15:03:24 +08:00
Kilu.He d2ccec79e4 feat: support block align (#4219)
* fix: mention bugs

* feat: support to align block range

* fix: inline formula bugs

* fix: adjust UI of color picker

* fix: tab bugs
2023-12-29 13:50:06 +08:00
Nathan.fooo 69469e9989 feat: Import appflowy data (#4236)
* refactor: traits

* feat: import data

* chore: track database view

* fix: import

* refactor: collab doc state

* refactor: get collab doc state

* feat: batch create collab object

* fix: test

* ci: run docker compose if the server is not up

* chore: bump collab

* chore: update ci

* chore: update ci

* chore: update ci

* chore: implement ui

* chore: implement ui

* chore: implement ui
2023-12-29 13:02:27 +08:00
Richard Shiue c821b8c4fe fix: field editor bugs (#4241) 2023-12-29 11:35:53 +08:00
Lucas.Xu 93786bad44 fix: disable unsupported buttons (#4242)
* fix: disable ... button and recover selection after changing text font

* fix: add image block will close keyboard on Android

* fix: the padding of align items are not equal

* fix: callout block issues
2023-12-29 11:35:39 +08:00
Lucas.Xu f5bfcdcb98 fix: unable to see the text of link menu in dark mode (#4239) 2023-12-29 11:18:00 +08:00
Lucas.Xu d57b61b213 fix: mobile ci (#4232) 2023-12-29 11:17:50 +08:00
Yijing Huang 43a3a1e4b2 chore: remove showFlowyMobileBottomSheet and replaced by showMobileBottomSheet (#4234) 2023-12-29 09:47:03 +08:00
Yijing Huang 65f3296508 chore: update board package ref version (#4233) 2023-12-29 09:46:29 +08:00
Yijing Huang 5cede74c89 fix: remove keyboard when tap outside text field (#4235) 2023-12-29 09:46:10 +08:00
Richard Shiue 54fcc4ac5b fix: notify all views of field type option (#4229) 2023-12-29 08:11:26 +08:00
Lucas.Xu 2ca911950c chore: adjust configuration for google play console (#4231) 2023-12-28 21:02:17 +08:00
Abhijeet SinghandLucas.Xu 462b67def9 chore: update translations (#4198)
* Update es-VE.json

* inlang: update translations

* Delete project.inlang/project_id

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-12-28 20:47:12 +08:00
Lucas.Xu 30a28b12d1 feat: add image block on mobile (#4230) 2023-12-28 20:39:18 +08:00
Lucas.Xu 0b3c904984 feat: add block menu (#4222)
* feat: add block menu

* fix: android add block issue
2023-12-28 12:37:10 +08:00
maTh 1e16168a3d fix: better wording for German i18n (#4227) 2023-12-28 11:05:23 +08:00
Nathan.fooo f5db384fc2 chore: bump collab (#4224)
* chore: bump collab

* chore: fix compile
2023-12-28 03:30:04 +08:00
Richard Shiue ce58737ec5 fix: bottom sheet updates apply immediately (#4220)
* fix: mobile field editor

* fix: immediately update select option

* fix: insert left and right field flow

* fix: create row behavior
2023-12-27 23:52:54 +08:00
Richard Shiue ca7b186325 chore: remove misleading vscode launch task (#4217) 2023-12-27 23:28:55 +08:00
Lucas.Xu d05b633b9b feat: improve toolbar dark mode (#4218) 2023-12-27 20:29:14 +08:00
Richard Shiue 1cde5a0df6 fix: mobile launch review (#4214)
* fix: text for changing field type

* fix: field name text field autofocus

* fix: don't allow insert left on primary field

* fix: edit field from view setting

* fix: edit non-current database view

* fix: row detail toggle hidden fields button

* fix: database view name autofocus

* fix: mobile date picker

* fix: deleting select option not deleting column

* fix: duplicate and delete view

* fix: mobile tab bar header left  padding
2023-12-27 11:56:06 +08:00
Nathan.fooo df8409178b refactor: remove singleton db (#4208)
* refactor: remove singleton db

* chore: fix warning

* chore: fix warning

* chore: update test

* chore: only resotre or backup when init call

* test: fix

* test: fix

* test: fix

* fix: timeout notification

* chore: rename

* chore: rename

* chore: disable test

* chore: remove log

* chore: remove log

* chore: add log

* chore: rename test functions

* chore: add test asset

* chore: bump client api

* chore: disable some tests
2023-12-27 11:42:39 +08:00
Lucas.Xu 121ed5a06e fix: tooltips and overlay related issues (#4206)
* fix: align button tooltip

* chore: upgrade Flutter to latest beta version

* chore: bump version 0.4.0

* chore: minor ui update

* chore: update dependencies

* chore: upgrade flutter api

* chore: use beta channel

* chore: disable search bar and optimize toolbar ui

* chore: rename extra info keys

* feat: highlight text again after changing color

* chore: update iOS icon

* fix: lose children issues when converting block type

* chore: update editor version

* chore: update iOS icon and android navigation bar color

* fix: docker build issue

* fix: android keyboard issues

* chore: update icon
2023-12-27 11:11:14 +08:00
Kilu.He 29e80a0f32 refactor: support nested block struct (#4200)
* refactor: support nested block struct

* fix: pasted bugs

* fix: fix lift node

* fix: unit test

* fix: selection style

* feat: support block color

* fix: turn to block bugs

* fix: code block bugs
2023-12-26 18:15:35 +08:00
Nathan.fooo a49b009980 tests: more cloud test (#4204)
* test: add anon user test

* chore: add to runner

* test: fix

* test: fix

* test: add tests

* chore: add test

* chore: fix warn

* chore: fix warn

* fix: build

* fix: test

* chore: rename

* chore: fix test

* chore: fix test

* chore: fix test

* chore: disable test
2023-12-26 02:03:42 +08:00
Ansah Mohammad 9b55f5bc7f fix: renamed duplicate shortcut commands (#4196) 2023-12-24 22:12:16 +08:00
Daniil 0371a28a42 chore: sync russian translation (#4202) 2023-12-24 22:10:31 +08:00
Lucas.Xu ce51491cf6 feat: support menu action in aa toolbar item (#4201) 2023-12-24 22:08:49 +08:00
Nathan.fooo c033d56978 chore: rename folder event (#4205) 2023-12-24 07:44:08 +08:00
Jiraffe7andnathan a4a21c7e94 chore: Update Diesel to 2.1.x (#4197)
* chore: update diesel to 2.1.x

* chore: commit tauri cargo lock file

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-12-23 23:27:15 +08:00
Kilu.He 851296fa0e fix: document title operation & copy & pasted
* fix: pasted html

* fix: document title operation

* fix: code review

* fix: jest test

* fix: copy & pasted

* fix: remove default style when pasted html

* fix: link selection

* fix: rust test
2023-12-23 21:14:32 +08:00
Lucas.Xu c3b183504f feat: mobile toolbar revamp (#4194)
* feat: toolbar ui revamp

* feat: implement bius and blocks

* feat: implement converting heading block

* feat: implement bius logic

* feat: implement numbered/bulleted/quote list logic

* feat: indent/outdent logic

* feat: implement link logic

* feat: toolbar ui improvement

* feat: implement toolbar biu logic

* feat: focus on biu if the selection is not collapsed

* feat: implement changing font logic'

* feat: implement color picker logic

* feat: support customzing text and background color

* fix: draghandler padding
2023-12-23 14:31:49 +08:00
Nathan.fooo 363bb3e45e test: add tests (#4199) 2023-12-23 13:35:24 +08:00
Yijing Huang acc93a603d fix: remove italic in inlined code (#4192) 2023-12-22 16:28:28 +08:00
Richard Shiue 8045042e78 chore: adjust mobile grid cell design (#4190) 2023-12-21 20:41:58 +08:00
Nathan.fooo 1401ba5960 feat: anon user save (#4185)
* feat: anon user save

* chore: add missing files

* chore: remove error
2023-12-21 14:13:21 +08:00
Richard Shiue 0730a0caf4 fix: select field type option editor overflow (#4188) 2023-12-21 12:16:18 +08:00
Richard Shiue 13260e1db8 feat: mobile view editor improvements (#4186)
* feat: database view editor improvements

* feat: implement calendar settings

* fix: wrong view being opened
2023-12-21 11:51:42 +08:00
Richard Shiue 4fa08fda02 fix: translation into the wrong language (#4187) 2023-12-21 11:03:27 +08:00
iMiaoandLucas.Xu 2042394501 chore: update translations (#4156)
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-12-21 09:34:49 +08:00
Yijing Huang bbeae74ebd feat: customized cursor and selection color (#4168) 2023-12-21 09:34:25 +08:00
Abhijeet Singh 3aad1c5bcd chore: update es-VE.json (#4173) 2023-12-21 09:33:39 +08:00
Yijing Huang f760e3d12a fix: close emoji menu by ESC key (#4182) 2023-12-21 09:32:56 +08:00
Yijing Huang 890285bb7b fix: exclude hyphen in code block (#4183) 2023-12-21 09:32:01 +08:00
AslamandLucas.Xu 366e28752c fix: text overflow issue of font family dropdown (#3348)
* fixed text overflow issue of font family dropdown

* added tooltip delay

* code review fixes: unwanted key removed; tooltip added for all fonts;
delay time reduces;

* Update frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-12-21 09:31:37 +08:00
Nathan.fooo 6ecc3c9076 test: add document sync test on appflowy cloud (#4163)
* test: add document sync test on appflowy cloud

* chore: add runner

* test: Stream has already been listened to.

* fix: using singleton subscription

* fix: using singleton subscription
2023-12-21 08:12:40 +08:00
Mohammad Zolfaghari f5a9f2bf4d fix: persist group order on reopenning AppFlowy (#4080)
* fix: persist group order on reopenning AppFlowy

Currently if you change groups order, on restarting AppFlowy they
will go back to what they were before.
This was because merge_groups function was not respecting the group
orders which were saved before as group settings.

* refactor: enhance the merge_group function

* refactor: use extend instead of for loop
2023-12-20 12:31:00 +08:00
Richard Shiue d68c847d59 refactor: database field type option (#4136)
* refactor: include field type option in FieldPB

* refactor: adapt changes on flutter

* refactor: adapt changes on new tauri grid

* refactor: adapt changes on old tauri grid/board

* chore: merge
2023-12-20 11:11:38 +08:00
Lucas.Xu 9a1ea138fc feat: sync the icon & title (#4150)
* feat: sync the icon & title

* feat: diff the view data when refreshing

* fix: unable to update folder

* test: refactor bloc tests
2023-12-20 10:08:35 +08:00
Bowling b466b425a5 chore: update translations (#4138) 2023-12-19 22:43:35 +08:00
Ansah Mohammad 15aefaa956 feat: add confirmation when deleting/restoring a page in the trash. (#4170)
* feat: added prompt before delete and restore

* feat: added prompts before delete all and restore all

* chore: fixed indendation

* refactor: changed the confirmation dialogue to use NavigatorAlertDialog

* chore: replaced text with localisable string and removed message from confirmationDialog

* refactor: Use alert directly from NavigatorAlertDialog
2023-12-19 22:42:37 +08:00
Lucas.Xu e7bdce0997 feat: mobile UI improvement (#4172)
* chore: use 1.0 as default textScaler

* feat: mobile editor ui improvement
2023-12-19 22:31:23 +08:00
Nathan.fooo 44e48712a6 chore: bump client api and collab (#4162) 2023-12-19 04:36:24 +08:00
Mathias Mogensen 7d512578b2 refactor: date picker abstraction (#4159)
* refactor: date picker abstraction

* refactor: move include time button
2023-12-18 13:10:12 +01:00
Kilu.He 0783f94cd6 chore: optimize the experience of the document (#4152)
* fix: scroll bug of grid

* chore: optimize the experience of the document

* fix: drag folder

* fix: add unit test to provider
2023-12-18 17:44:47 +08:00
Richard Shiue eef34caf27 feat: revamp mobile database tab bar (#4160) 2023-12-18 17:04:20 +08:00
Nathan.fooo 5ef9d55dca fix: open local folder when fail to init with remote server data (#4158) 2023-12-18 03:14:05 +08:00
Richard Shiue 781fbf1b30 refactor: some code organization and date picker ui improv (#4148)
* chore: use appflowy_editor's platform extensions

* chore: organize code

* chore: improve mobile date picker
2023-12-15 18:20:44 +08:00
Lucas.Xu 60ba775bed fix: scheme doesn't work on macOS with flutter 3.16 (#4147)
* fix: scheme doesn't work on macOS with flutter 3.16

* chore: revert code
2023-12-15 16:07:08 +08:00
Richard Shiue d862455342 feat: add borders on mobile grid (#4146)
* feat: mobile grid ui improvements

* chore: restore Podfile.lock
2023-12-14 23:15:26 +08:00
Lucas.Xu d26606d3d3 fix: unable to sync the folder data (#4141) 2023-12-14 20:33:00 +08:00
mahynotch 6cece56ca7 chore: update translations (#4144)
* inlang: update translations

* inlang: update translations

* inlang: update translations
2023-12-14 15:15:05 +07:00
Camus Qiu 2b096e967d fix: chinese translation error (#4115) (#4142) 2023-12-14 15:13:50 +07:00
Ansah Mohammad 7884fd1913 chore: added settings.json in gitignore (#4130)
* added settings.json in .gitignore

* Stop tracking .vscode/settings.json
2023-12-13 15:26:21 +08:00
Lucas.Xu 3f9b598493 feat: add link preview block (#4137)
* feat: add link preview block

* test: add integration test
2023-12-13 15:21:38 +08:00
Lucas.Xu d5b9063f78 chore: revert flutterMode (#4135) 2023-12-12 17:01:23 +08:00
watchakorn-18kandLucas.Xu b80b222527 chore: update translated into the most recent version in Thai, with extra words fixed. (#4132)
* Added Thai language

* Complete Thai translation

* feat: Added Thai translation

* chore: Translate more Thai using modern terminology and avoid outdated slang.

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-12-12 10:03:56 +08:00
Nathan.fooo c175947818 chore: bump up client api (#4128)
* chore: bump up client api

* chore: bump up collab rev

* chore: bump up client api
2023-12-11 22:25:07 +08:00
Richard Shiue b7b8713cd9 chore: code cleanup (#4129) 2023-12-11 20:49:21 +08:00
Lucas.Xu 81e09ae72e fix: database memory leaks (#4126) 2023-12-11 20:48:58 +08:00
Richard Shiue 4e6643eca8 refactor: order object position and field service (#4118)
* refactor: create OrderObjectPositionPB

* refactor: use ObjectOrderPosition for creating rows

* refactor: field backend service

* refactor: use field_id for reordering fields

* style: reorder dependencies

* fix: changes on tauri

* feat: insert row above

* chore: don't pass group_id while duplicating a row
2023-12-11 11:19:20 +08:00
Lucas.Xu 7586930ef0 chore: disable material3 (#4124) 2023-12-11 10:23:48 +08:00
Richard Shiue e9a4efb67d chore: reorganize vscode tasks (#4125) 2023-12-11 09:01:12 +08:00
Richard Shiue eff06a1f74 chore: bump protobuf version (#4123)
makes it compatible with protoc_plugin 21.x.x
2023-12-10 21:26:53 +08:00
Lucas.Xu 775955df5c feat: optimize editor memory usage (#4120) 2023-12-10 21:26:23 +08:00
Yijing Huang 8cf6ab32f0 fix: mobile UI (#4121)
* fix: use default splash color

* chore: improve card border UI
2023-12-10 21:25:11 +08:00
Mathias Mogensen 177cca60c4 fix: notes disappears (#4122) 2023-12-10 13:44:37 +02:00
Mathias Mogensen 649545cdf3 feat: mobile notifications screen (#4100)
* fix: update username on mobile header on change

* feat: notifications page

* feat: refactor and refinement

* fix: code review
2023-12-08 21:04:09 +08:00
Henrique Miossi de Araújo 2a421034d9 chore: update pt-BR translations (#4109) 2023-12-08 21:02:27 +08:00
Lucas.Xu ef49cb6577 feat: upgrade to flutter 3.16 (#4119)
* feat: upgrade to flutter 3.16

* chore: adjust flutter 3.16 new api

* chore: code format

* fix: ci lint

* chore: code format

* chore: dart format
2023-12-08 21:01:54 +08:00
Lucas.Xu 6338ca1417 feat: support building apk on github action (#4117) 2023-12-08 15:49:06 +08:00
Nathan.fooo acb3c795d0 chore: bump client api (#4112) 2023-12-07 10:33:25 +08:00
Lucas.Xu 4405b597cd chore: bump version 0.3.9.1 (#4113) 2023-12-07 09:36:12 +08:00
Richard Shiue a7ce21e941 fix: mobile board card title not updating (#4110) 2023-12-07 09:09:18 +08:00
nathan 05bdd052ab chore: fmt 2023-12-07 08:05:33 +08:00
Nathan.fooo d86431dfbc fix: migrate cloud document when the document content is not sync to … (#4108)
* fix: migrate cloud document when the document content is not sync to local

* chore: clippy
2023-12-07 01:14:02 +08:00
Nathan.fooo 4837d7f7fe fix: migrate anon user to appflowy cloud (#4106)
* chore: fix migrate anon user to appflowy cloud

* chore: remove log

* fix: test

* chore: fmt
2023-12-06 22:54:17 +08:00
Kilu.He d765806337 feat: parity features for flutter grid (#4082)
* feat: parity features of flutter grid

* feat: replace another virtual scroll component

* fix: fix eslint error

* fix: modify the drag style

* fix: remove log

* fix: add css style for row when context menu display
2023-12-06 14:54:41 +08:00
Lucas.Xu fe5ce75ea8 fix: minor ui issues (#4102)
* fix: minor ui issues

* feat: support using emoji as icon

* chore: update langauges

* fix: missing reminder bloc in detail page

* fix: integration test
2023-12-06 13:49:30 +08:00
Richard Shiue 99b2b2712b test: date group_id generation logic (#4045) 2023-12-06 12:06:49 +08:00
Richard Shiue 96af012471 fix: grid width update (#4101)
* chore: enable checklist on mobile

* fix: width of grid not updating properly

* chore: fix sign-in button color and font
2023-12-06 11:39:25 +08:00
Nathan.fooo 7ad05feb5b fix: nav title of cloud setting on mobile (#4098) 2023-12-06 06:02:45 +08:00
nathan 69d3181a64 fix: icon url 2023-12-06 03:05:07 +08:00
Nathan.fooo 109ebaf989 fix: url icon (#4097) 2023-12-06 02:38:50 +08:00
Nathan.fooo 1a13de2ee9 chore: bump collab rev (#4096) 2023-12-06 02:04:23 +08:00
Lucas.XuandRichard Shiue 48d6967d3b fix: double click to select / unselect options (#4094)
Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-12-05 20:23:20 +08:00
Lucas.Xu 7d55153475 feat: add quick edit panel (#4089)
* feat: add quick edit panel

* feat: improve datepicker color

* fix: quick edit field editor overflow

* chore: try to fix mobile ci

* Revert "chore: try to fix mobile ci"

This reverts commit 68f0ccecd6.
2023-12-05 17:34:42 +08:00
Richard Shiue d25830aece feat: mobile grid fab (#4093) 2023-12-05 17:24:38 +08:00
Richard Shiue 04eea26a55 fix: hidden board card cannot open as page (#4090)
* fix: card open in board

* style: super.key and remove unused variables

* chore: more code cleanup
2023-12-05 17:24:21 +08:00
Richard Shiue 25e94da7e7 feat: mobile checklist (#4088)
* fix: grid header new property font size on desktop

* feat: checklist cell and editor on mobile
2023-12-05 13:39:51 +08:00
Nathan.fooo 2d7a373d77 chore: fix migrate empty document (#4087)
* chore: fix migrate empty document

* chore: update collab rev
2023-12-05 12:25:15 +08:00
Lucas.Xu 1491fbfb0d fix: 0.3.9 launch review (#4076)
* fix: cursor away doesn’t save the change. This behavior is inconsistent with the rest

* fix: emoji doesn’t show fully

* chore: set the default header text style to bold

* fix: add missing divider in time option

* fix: update placeholder cover color

* fix: background color of the change cover button

* fix: remove redundant padding

* fix: use done action instead of return

* fix: incorrect font size used in board and editor

* feat: update appflowy-editor

* fix: document freeze and the toolbar was invisible when hovering the align icon that in the toolbar

* fix: snackbar text is invisiable

* feat: padding of add icon button should be aligned the block

* chore: update icon

* fix: ci issues

* feat: add time picker
2023-12-05 10:46:17 +08:00
Nathan.fooo 0d776a9294 chore: bump up yrs to 0.17.1 (#4078)
* chore: bump yrs

* chore: update rev
2023-12-05 06:20:07 +08:00
Richard Shiue d4cef2e866 chore: various database UI fixes (#4077)
* chore: only activate row detail from primary field

* chore: fix create filter and sort list

* chore: allow reordering rows when active filter

* chore: reduce animations in tab bar

* chore: url accessory tooltip

* feat: use number keyboard for number cell inputs

* chore: mobile grid padding adjustments

* chore: field cell redesign and first field cannot be reordered

* fix: deal with empty fields

* chore: improve appearance of card action sheet
2023-12-04 22:58:02 +08:00
Kilu.HeandRichard Shiue a070ed2441 feat: support all fields type and filters in grid of tauri
* feat: support the single select field actions in grid of tauri

* feat: support multiselect

* feat: support number field and number filter

* feat: support url field

* fix: eslint error

* feat: support checkbox filter

* feat: support checklist field

* fix: adjusting keydown event

* fix: edit record ui

* feat: support date field

* fix: url field bugs

* fix: the bug of the type option wasn't update

* chore: make plural tokens compatible with tauri

* fix: plural key

* fix: optimize get cell performance

* fix: update ts error

* fix: update select option bugs

* fix: grid calculate css

* fix: add DidUpdateFieldSettings

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-12-04 10:33:31 +08:00
Richard Shiue 5fa441cbf5 fix: launch review issues (#4075)
* chore: add a tooltip for fields in row detail page

* fix: grouping by field makes cell contents disappear

* chore: code cleanup

* chore: env var values in launch.json should be string

* fix: group orders not being saved

* test: fix test

* chore: more code cleanup

* fix: field settings not found

* chore: ellide cell text

* fix: alignment issues in row detail page
2023-12-04 10:22:26 +08:00
Lucas.Xu 4ae679128f fix: mobile ui issues (#4074)
* fix: edit field ui issues

* fix: set desktop font weight to w500
2023-12-03 22:12:07 +08:00
Richard Shiue 4d71b42a3d chore: misc mobile UI improvements (#4072)
* chore: adjust colors

* chore: adjust card detail padding and text weight

* fix: recent view horizontal padding

* chore: entire row opens row detail page
2023-12-03 12:19:43 +08:00
Richard Shiue ff3ff9f888 feat: integrate new field editor components (#4070)
* chore: use the fancy new create field UI

* chore: adjust select option tag text weight

* chore: use new field editor

* chore: remove old field editor

* chore: code cleanup
2023-12-02 22:23:19 +08:00
Lucas.Xu 147080ad27 chore: bump version 0.3.9 (#4069) 2023-12-02 21:34:42 +08:00
Richard Shiue bb4b987681 chore: require always two lines (#4068) 2023-12-02 21:33:15 +08:00
Lucas.Xu 415f121720 feat: edit property (#4065)
* feat: edit property

* feat: disable actions if field is primary

* feat: remove include time

* chore: set title to medium

* fix: flutter analyze

* chore: update built in text style

* chore: update text style

* fix: unable to click the calendar day
2023-12-02 20:39:03 +08:00
Yijing Huang 9824d5980a fix: mobile bugs fix (#4059)
* fix: add missing tap gesture

* fix: unify bottom sheet shape and padding

* fix: fail to pop the detail page when add new card

* fix: show card title placeholder when it is empty

* refactor: ThirdPartySignInButtons

* chore: add resizeToAvoidBottomInset in showFlowyMobileBottomSheet

* chore: refactor code
2023-12-02 19:46:02 +08:00
Richard Shiue 5ff6405f7f chore: optimize recent page views section UI (#4067)
* chore: adjust text sizing in recent views section
2023-12-02 18:07:07 +08:00
Nathan.fooo a4e0c5754f ci: cloud integration test (#4062) 2023-12-02 06:47:10 +08:00
Richard Shiue 5f94ba129e feat: mobile detail page UI revamp (#4057)
* feat: card detail page ui revamp

* feat: redesign the cells

* chore: code cleanup

* chore: code review

* fix: merge issues

* chore: adjust cell ui size and padding

* fix: dart analyzer

* fix: integration test

* fix: test
2023-12-02 02:03:30 +08:00
Lucas.Xu af07b53484 feat: new property ui revamp (#4063)
* feat: implement new property page

* feat: implement date option

* feat: add include time

* feat: add field header

* feat: implement new property page

* feat: add icons

* feat: add color list

* feat: add color list

* feat: integrate new property page

* feat: support creating property with values

* fix: select option doesn't work

* feat: set textinputaction to done
2023-12-01 20:16:43 +08:00
Nathan.fooo b43b522d97 chore: enable cloud setting on mobile (#4060)
* chore: enable cloud setting on mobile

* chore: disable ansi

* chore: bump up client api

* chore: bump up client api
2023-12-01 11:17:49 +08:00
Lucas.Xu 0683483fd4 fix: editor page issues (#4055)
* fix: disable editor in card detail page

* fix: mobile toolbar disappears after editing link

* fix: favorite icon shows incorrectly

* fix: inkWell when pressing on the Trash is different from the rest of our list tiles in the app

* fix: recent view didn't update after deleting view

* fix: trash button too small

* feat: use new bottom sheet style in cover plugin

* feat: use new bottom sheet style in add new page

* feat: use new bottom sheet style in view page option

* feat: use new bottom sheet style in image block

* feat: use new bottom sheet style in settings block and edit link menu

* fix: data picker doesn't show

* fix: flutter analyze
2023-12-01 09:58:36 +08:00
Nathan.fooo afab3d5374 chore: enable debug with localhost (#4058) 2023-12-01 05:47:12 +08:00
Mohammad Zolfaghari 066bba95f5 fix: update auto-update fields on change group (#3833)
* fix: update auto-update fields on change group

auto-update fields should get updated when on moving row from one
group to another. They where getting updated only on changing row
properties directly.
Also added integration test for changing row groupd related to #3010.

* style: rust format

* fix: add board group test to runner

* fix: update auto updated fiels only when group has changed

* fix: apply group changeset before move_row

* fix: get from_row before move_row

* fix: groups method changed to get_all_groups

* fix: pass from group id in move group payload

We can't know the from group id from the row itself. Because a row
can exist in multiple groups (group by multiselect).

* fix: MoveGroupRowPayloadPB from_group_id index
2023-12-01 00:24:10 +08:00
Nathan.fooo d004c94a2f chore: bump up tauri version (#4056) 2023-12-01 00:11:43 +08:00
Lucas.Xu c0ae803280 feat: hide tabbar when pushing to view page (#4050) 2023-11-30 16:56:59 +08:00
Lucas.Xu d7a67c0efb feat: support editing database icon (#4052) 2023-11-30 16:56:44 +08:00
Nathan.fooo b307dd30d8 chore: fix macos open crash (#4051)
* chore: disable native cpu

* chore: update client api
2023-11-30 13:46:10 +08:00
Yijing Huang 068245eec9 chore: improve UI in MobileSignInScreen (#4048) 2023-11-30 10:03:25 +08:00
Yijing Huang 6b4d4fef15 feat: mobile board view (#4030) 2023-11-30 10:01:29 +08:00
Nathan.fooo 64aa2ba7e4 feat: open appflowy from admin web (#4047)
* feat: open appflowy from admin web

* feat: add loading indicator
2023-11-30 04:55:13 +08:00
Lucas.Xu 8665a25b39 feat: date picker ui revamp (#4044)
* feat: date picker editor

* feat: refactor date picker on mobile

* chore: update background color

* feat: date picker UI revamp

* feat: optimize the scroll behavior

* chore: remove unused code
2023-11-29 21:02:04 +08:00
Yijing Huang 551e012147 feat: improve UI in MobileFieldEditor (#4042) 2023-11-29 10:38:11 +08:00
Lucas.Xu 7da759c662 feat: support select / multi select option (#4039)
* feat: implement select option cell

* feat: support adding new select option

* feat: support selecting / deselecting option

* feat: clear search field after adding new property

* feat: support updating option name
2023-11-29 09:38:53 +08:00
Nathan.fooo 8036d070ad feat: create the default workspace on cloud when using appflowy cloud (#4040)
* chore: sync strategy for collab type

* chore: update rev id

* chore: update rev id

* ci: fix test

* ci: fix test
2023-11-29 07:49:47 +08:00
Mathias Mogensen a5ed145aa3 feat: mobile no date optimization (#4038)
* feat: mobile no date optimization

* fix: code review
2023-11-29 07:19:40 +08:00
Richard Shiueandnathan 20b485bcfe feat: insert a new field to the left or right of an existing one (#4022)
* feat: allow inserting fields before or after a certain field

* fix: tauri build

* chore: implement frontend

* test: rust-lib tests

* test: integration test

* chore: point to temp collab rev

* chore: bump collab rev

* chore: fix tauri build

* chore: fix the tauri build, for real this time

* fix: new field editor show detail not general

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-11-29 04:42:53 +08:00
Lucas.Xu 38e3947b2d chore: disable codecov (#4037) 2023-11-28 17:43:05 +08:00
Lucas.Xu 94f9349aba fix: sv.json missing (#4035) 2023-11-28 11:46:11 +08:00
Mathias Mogensen a9ea8fd159 fix: changing visibility of property (#4032)
* fix: changing visibility of property

* fix: null aware ternary
2023-11-28 11:45:50 +08:00
Mathias Mogensen 1e6762b424 fix: url cell mobile (#4029) 2023-11-28 11:45:02 +08:00
Richard Shiue 7c54b6d599 fix: mobile grid issues (#4026)
* chore: some mobile grid issues

* fix: grid right padding
2023-11-28 11:44:45 +08:00
Nathan.fooo 3e17613f54 tests: AppFlowy Cloud integration test (#4015)
* chore: save cloud ofnig

* chore: fix .a link warnings

* chore: add cloud test runner

* refactor: test folder

* ci: add test

* ci: add test

* ci: fix

* ci: fix
2023-11-28 10:54:31 +08:00
Richard ShiueandMathias Mogensen 9d61ca0278 feat: delete kanban board groups (#3925)
* feat: hide/unhide ui

* chore: implement collapsible side bar and adjust group header (#2)

* refactor: hidden columns into own file

* chore: adjust new group button position

* fix: flowy icon buton secondary color bleed

* chore: some UI adjustments

* fix: some regressions

* chore: proper group is_visible fetching

* chore: use a bloc to manage hidden groups

* fix: hiding groups not working

* chore: implement hidden group popups

* chore: proper ungrouped item column management

* chore: remove ungrouped items button

* chore: flowy hover build

* fix: clean up code

* test: integration tests

* fix: not null promise on null value

* fix: hide and unhide multiple groups

* chore: i18n and code review

* chore: missed review

* fix: rust-lib-test

* fix: dont completely remove flowyiconhovercolor

* chore: apply suggest

* fix: number of rows inside hidden groups not updating properly

* fix: hidden groups disappearing after collapse

* fix: hidden group title alignment

* fix: insert newly unhidden groups into the correct position

* chore: adjust padding all around

* feat: reorder hidden groups

* chore: adjust padding

* chore: collapse hidden groups section persist

* chore: no status group at beginning

* fix: hiding groups when grouping with other types

* chore: disable rename groups that arent supported

* chore: update appflowy board ref

* chore: better naming

* feat: delete kanban groups

* chore: forgot to save

* chore: fix build and small ui adjustments

* chore: add a confirm dialog when deleting a column

* fix: flutter lint

* test: add integration test

* chore: fix some design review issues

* chore: apply suggestions from Nathan

* fix: write lock on group controller

---------

Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
2023-11-28 10:43:22 +08:00
Lucas.Xu 3595de5e12 fix: v0.3.8.2 known issues (#4025) 2023-11-28 10:29:05 +08:00
Mathias Mogensen 32ca864bf7 fix: open slash menu on adding block above/below (#4028) 2023-11-28 02:41:30 +01:00
Mathias Mogensen bfa9233bd4 fix: mobile improvements for calendar (#4027) 2023-11-28 02:13:22 +01:00
Lucas.Xu c659cf4ff2 fix: mobile UI issues (#4020)
* fix: color picker overflow

* fix: image picker overflow

* feat: expand list item to 48.0
2023-11-27 13:51:05 +08:00
Richard Shiue cac3acd553 feat: open a mobile grid row as a page (#4000)
* chore: restore text cursor color

* chore: open row as a card in mobile

* refactor: clean up code

* chore: code review

* chore: restore c++ shared library
2023-11-27 12:37:38 +08:00
Mathias Mogensen 771dd9979f feat: mobile database settings rework (#4016)
* feat: mobile database settings rework

* chore: clean
2023-11-27 12:36:10 +08:00
Lucas.Xu 929508df16 chore: set minimum macos target development target supported to 10.14 (#4011) 2023-11-27 10:29:39 +08:00
Lucas.Xu 79b1515c3a fix: memory leaks (#3995)
* feat: add memory leak monitor

* fix: memory leaks

* feat: dump call stack in memory leak detector

* chore: disable memory leak detector
2023-11-26 15:10:48 +08:00
Mathias Mogensen 7fb1b4f43f feat: optimize calendar for mobile (#3979)
* feat: calendar mobile ui

- Resolves double border on Calendar Cells
- Adds Jump to year quick action for Mobile
- Reduces Cell height in Calendar
- Change out EventList with EventIndicator in Cell

* chore: push card details screen

* fix: navigation to card details

* feat: day events screen update on new event

* fix: changes after merging main

* fix: missing argument

* fix: amend test and remove stack
2023-11-25 15:31:54 +01:00
Nathan.fooo b3dd5fb8bd fix: windows callback (#4006)
* tests: fix supabase integration test

* ci: fix

* chore: fix windows callback
2023-11-25 17:18:31 +08:00
Richard Shiue 29a6eab1ce fix: select option mouse-click event conflict (#4003) 2023-11-24 23:13:52 +08:00
Richard ShiueandLucas.Xu c475a5d960 ci: use linux vm for dart unit test (#3991)
* chore: use the faster linux vm

* chore: download artifact

* chore: make it work

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-24 16:20:25 +08:00
Lucas.Xu 414bb26e56 feat: support changing block background color (#3998) 2023-11-24 15:30:20 +08:00
Nathan.fooo 1fad713477 feat: custom server url in application (#3996)
* chore:test

* chore: update ui

* feat: set appflowy cloud url

* chore: add self host docs

* fix: save user

* fix: sign out when authenticator not match

* fix: sign out when authenticator not match

* fix: db lock

* chore: remove unuse env file

* test: disable supabase cloud test

* test: disable supabase cloud test

* chore: fix save
2023-11-24 11:54:47 +08:00
Richard ShiueandMathias Mogensen e18e031710 chore: adjust board card UI (#3954)
* chore: adjust board card UI

* chore: fix accessory popover and add title placeholder

* chore: add pubspec.lock

* chore: fix integration test

* chore: apply suggestions from code review

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

* chore: apply suggestions from Mathias

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2023-11-24 00:25:12 +08:00
Lucas.Xu bddaac05ae fix: unable to login on android when building in release mode (#3994) 2023-11-23 23:32:52 +08:00
Richard Shiue 3e5fae002b chore: remove the flutter submodule from contributor (#3993) 2023-11-23 22:32:27 +08:00
Richard Shiue 66835a5409 feat: field editing bloc refactor and add mobile field editor (#3981) 2023-11-23 16:43:29 +08:00
Lucas.Xu 8afbf28430 feat: improve editing link user experience (#3990) 2023-11-23 16:42:36 +08:00
Kilu.He 0427402ba7 fix: adjusting sort UI and support filter and settings (#3971)
* fix: adjusting sort UI and support filter and settings

* fix: code review
2023-11-23 15:57:08 +08:00
Emil 6973d66263 chore: update Russian translations (#3933) 2023-11-23 12:40:27 +08:00
watchakorn-18kandLucas.Xu 5fea801a88 chore: add Thai language (#3985)
* Added Thai language

* Complete Thai translation

* feat: Added Thai translation

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-23 12:40:09 +08:00
MarekJAM 8b81889bcf chore: updated polish translations (#3959) 2023-11-23 10:54:34 +08:00
slhmy 800094587b feat: update simple Chinese translation (#3963) 2023-11-23 10:54:13 +08:00
Kaya Zeren de75e028df chore: turkish translation update (#3983)
Existing translation strings are reviewed and missing ones  are completed.
2023-11-23 10:39:18 +08:00
Lucas.Xu 9b3c1921e8 fix: login page hint text overflow (#3987) 2023-11-23 09:39:40 +08:00
Lucas.Xu 412f34c72a feat: add ... button in mobile toolbar (#3970)
* feat: add ... button in mobile toolbar

* fix: the title state should be reset when canceling

* fix: reset hover status after picking emoji

* fix: some emojis missing on linux and android

* fix: unable to press enter key to rename page
2023-11-22 10:49:22 +08:00
Yijing Huang a7364e1f4a fix: set cell style nullable (#3984) 2023-11-22 10:49:01 +08:00
Richard ShiueandLucas.Xu 16467e9c13 chore: improve mobile grid page (#3939)
* chore: more typo

* chore: improve appearance of mobile grid page

* fix: focus problems with editable grid cells

* chore: apply suggestions from Mathias

* revert: the dragged header looks ugly

* chore: more suggestions from Mathias

* chore: more tarbars

* fix: scrollbar padding is a bit off

* chore: add launch tasks and fix android debug

* chore: more mobile grid improvement

* fix: initial attempt to fix cell focus bug

* chore: fix grid cell lazy loading

* chore: fix cell focus problems

* chore: update same changes to desktop

* fix: revert accessory changes due to regression

* chore: new database view name i18n

* chore: add mobile tab bar header

* fix: fiz zuh eentuhgrashun tastes

* chore: rudimentary grid header

* style: code style stuffz

* chore: restore android standard lib

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-21 22:54:09 +08:00
Richard Shiue b00d29d0cd test: fix integration tests (#3977) 2023-11-21 21:50:31 +08:00
Yijing HuangandLucas.Xu acc951c5eb feat: mobile card detail screen (#3935)
* feat: add CardDetailScreen and CardPropertyEditScreen

- add basic UI layout for these two screens
- add MobileTextCell as the GridCellWidget adapts to mobile

* feat: add MobileNumberCell and MobileTimestampCell

* feat: Add MobileDateCell and MobileCheckboxCell

- Add MobileDateCellEditScreen
- Add dateStr and endDateStr in DateCellCalendarState

* feat:  add MobileFieldTypeOptionEditor

- Add placeholder for different TypeOptionMobileWidgetBuilders
- Add _MobileSwitchFieldButton

* feat: add property delete feature in CardPropertyEditScreen

* fix: fix VisibilitySwitch didn't update

* feat: add MobileCreateRowFieldScreen

- Refactor MobileFieldEditor to used in CardPropertyEditScreen and MobileCreateRowFieldScreen
- Add MobileCreateRowFieldScreen

* chore: localization and improve spacing

* feat: add TimestampTypeOptionMobileWidget

- Refactor  TimeFormatListTile to be used in TimestampTypeOptionMobileWidget and _DateCellEditBody
- Add IncludeTimeSwitch to be used in TimestampTypeOptionMobileWidget and _DateCellEditBody

* feat: add checkbox and DateTypeOptionMobileWidget

* chore: improve UI

* chore: improve spacing

* fix: fix end time shown issue

* fix: minor issues

* fix: flutter analyze

* chore: delete unused TextEditingController

* fix: prevent group field from deleting

* feat: add NumberTypeOptionMobileWidget

* chore: rename and clean code

* chore: clean code

* chore: extract class

* chore: refactor reorder cells

* chore: improve super.key

* chore: refactor MobileFieldTypeList

* chore: reorginize code

* chore: remove unused import file

* chore: clean code

* chore: add commas due to flutter upgrade

* feat: add MobileURLCell

* fix: close keyboard when user tap outside of textfield

* chore: update go_router version

* fix: add missing GridCellStyle

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-20 22:56:21 -07:00
Nathan.fooo b9ecc7ceb6 chore: add custom folder prompt (#3961)
* chore: add custom folder prompt

* chore: zip collab db

* chore: fix test

* chore: add test

* chore: fmt

* chore: fmt

* chore: fmt
2023-11-20 20:54:47 +08:00
Lucas.Xu 6f83f41c2d refactor: use dependency injection to adapt the theme on mobile. (#3957) 2023-11-20 10:35:13 +08:00
Nathan.fooo 8179419f8b feat: show server url (#3956)
* chore: data folder for cloud

* chore: display server url

* chore: fix test
2023-11-17 15:38:56 +08:00
Mathias Mogensen 4a1a143a66 fix: checkbox power toggle missing configuration (#3941)
* fix: add trigger for checkbox children toggle

* fix: localization of block placeholders
2023-11-17 13:55:25 +08:00
Emil 21bbf87089 chore: update Russian, fix naming conventions and typos (#3946)
* chore: typos fix

* chore: compliance with naming conventions
2023-11-17 13:53:21 +08:00
Richard Shiue 19d9e7717c chore: use page icon instead of document icon (#3952) 2023-11-17 13:52:33 +08:00
Lucas.Xu d190850f03 feat: keep the toolbar the same height as the keyboard to optimize the editing experience (#3947) 2023-11-17 13:51:26 +08:00
Kilu.He 68de83c611 feat: support modified cell in modal (#3948)
* feat: support drag fields in modal

* fix: wrong draggable position
2023-11-17 10:56:25 +08:00
Richard Shiue 729b8571b5 chore: fix ungroupedsection being shown (#3953)
* chore: fix ungroupedsection being shown

* chore: board ui adjustment
2023-11-17 09:27:10 +08:00
Lucas.Xu 31e9a0b4ea feat: adjust code block, outline block on mobile (#3940)
* fix: missing delete cover button on mobile

* fix: ensure last node is an empty paragraph

* feat: adjust code block

* feat: adjust code block on mobile

* feat: adjust outline on mobile

* fix: appimage builder issues

* fix: view title issues

* fix: integration tests
2023-11-15 16:04:18 +08:00
Lucas.Xu 6a9866b9d2 chore: upgrade flutter to 3.13.9 (#3936) 2023-11-14 22:33:07 +08:00
Nathan.fooo 1c500fbfc5 feat: add lru cache for document/database instance (#3938) 2023-11-14 17:21:09 +08:00
Richard Shiue 4992f9c281 chore: fix-typo (#3934) 2023-11-14 15:41:44 +08:00
Nathan.fooo 75c26c807c feat: User profile notify (#3937)
* chore: collab rev

* feat: recv user change via websocket
2023-11-14 14:01:46 +08:00
Richard Shiue e788c71602 fix: padding issue with the select tags (#3929)
* fix: padding issue with the select tags

* chore: better solution from Lucas
2023-11-13 21:41:25 +08:00
Emil 7de2131431 chore: update Russian translations (#3823) 2023-11-13 19:36:41 +08:00
Richard Shiue 47f3702ca9 fix: integration test on kanban (#3928) 2023-11-13 19:32:11 +08:00
Lucas.Xu 3708a5b86a feat: add alignment and indent/outdent toolbar item (#3927)
* chore: rename mobile list toolbar item

* feat: add alignment and indent/outdent toolbar item

* feat: adjust link menu on mobile platform
2023-11-13 18:08:39 +08:00
Richard ShiueandMathias Mogensen a63a7ea611 feat: hidden kanban groups (#3907)
* feat: hide/unhide ui

* chore: implement collapsible side bar and adjust group header (#2)

* refactor: hidden columns into own file

* chore: adjust new group button position

* fix: flowy icon buton secondary color bleed

* chore: some UI adjustments

* fix: some regressions

* chore: proper group is_visible fetching

* chore: use a bloc to manage hidden groups

* fix: hiding groups not working

* chore: implement hidden group popups

* chore: proper ungrouped item column management

* chore: remove ungrouped items button

* chore: flowy hover build

* fix: clean up code

* test: integration tests

* fix: not null promise on null value

* fix: hide and unhide multiple groups

* chore: i18n and code review

* chore: missed review

* fix: rust-lib-test

* fix: dont completely remove flowyiconhovercolor

* chore: apply suggest

* fix: number of rows inside hidden groups not updating properly

* fix: hidden groups disappearing after collapse

* fix: hidden group title alignment

* fix: insert newly unhidden groups into the correct position

* chore: adjust padding all around

* feat: reorder hidden groups

* chore: adjust padding

* chore: collapse hidden groups section persist

* chore: no status group at beginning

* fix: hiding groups when grouping with other types

* chore: disable rename groups that arent supported

* chore: update appflowy board ref

* chore: better naming

* test: fix tests

---------

Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
2023-11-13 16:14:31 +08:00
Kilu.He 7867f0366e feat: support the operations of field in the grid of tauri (#3906)
* feat: support the operations of field in the grid of tauri

* fix: performance optimizate
2023-11-13 14:16:32 +08:00
Lucas.Xu 251c6d22b2 fix: 0.3.8 known issues (#3912)
* fix: add a left padding to align the document and grid field

* fix: emoji picker in the slash menu is too small

* fix: replace the delete icon color with black

* fix: improve snackbar background color

* fix: cannot add new line after toggle list

* feat: set ⭐ as the default icon of getting started

* fix: the titlebar overflows when the title level is too deep

* fix: integration test

* fix: openAI hint text overflow

* fix: integration tests
2023-11-13 12:00:03 +08:00
Lucas.Xu 7cee8e392f feat: adjust cover plugin and support recent section on mobile platform (#3921) 2023-11-13 10:07:46 +08:00
Richard Shiue 765103dd22 chore: share button text color (#3913) 2023-11-12 23:41:10 +08:00
Nathan.fooo 50e612511d feat: using workspace crate deps (#3924)
* chore: workspace deps

* chore: use workspace deps
2023-11-12 21:18:27 +08:00
Nathan.fooo 7eb20b232a feat: adding suffix for user data folder when current cloud type is appflowy cloud (#3918)
* fix: load database fail caused by spawning long run task

* chore: yield long run task

* chore: fmt

* chore: update client api

* feat: copy data between server

* ci: fix af cloud test
2023-11-12 18:00:07 +08:00
Kritarth Sharma 3c7e636b65 fix: added missing hover tooltip to toolbar item (#3786) 2023-11-10 15:42:40 +08:00
Mathias Mogensen 889a313cc2 chore: update to version 0.3.8 (#3902)
* chore: update to version 0.3.8

* chore: Update CHANGELOG.md

* chore: Update CHANGELOG.md
2023-11-09 13:11:33 +08:00
Lucas.Xu 9586ea0e6f feat: display the titles of a view's ancestors and the view's title on the title bar. (#3898)
* feat: add no pages inside tips

* feat: show view's ancestors (include itself) title on bar

* feat: show view's ancestors (include itself) title on bar

* test: add integration tests

* fix: integration tests
2023-11-09 13:11:13 +08:00
Mathias Mogensen 42e7317cd4 fix: notifications setting (#3903)
* fix: notifications setting

* fix: remove dependency in reminder bloc

* test: remove redundant lines
2023-11-09 00:32:10 +01:00
Mathias Mogensen 17651bf64c feat: show notes icon when notes is not empty (#3893)
* feat: show notes icon when notes is not empty

* fix: redundant clone

* chore: update collab and fix after merging main
2023-11-09 00:30:50 +01:00
Nathan.fooo 73f1c211c2 fix: Invalid refresh token (#3879)
* chore: update client api

* chore: update client api

* chore: update client api

* chore: fix clippy

* chore: fix clippy

* ci: fix

* chore: update client api
2023-11-08 21:48:17 +08:00
Lucas.Xu afc6473582 feat: adjust toggle list, callout, quote and divider on mobile (#3894)
* feat: adjust toggle list block

* feat: show block actions when tapping divider

* feat: add toggle list and callout to toolbar

* feat: refactor the emoji picker button

* fix: toggle list integration tests
2023-11-08 21:10:29 +08:00
Kilu.He 663f9d3423 fix: support inserting grid block in editor (#3875)
* fix: support inserting grid block in editor

* feat: support adding view in table

* feat: support the operations of row in tauri grid
2023-11-08 14:13:17 +08:00
Generic-Ripe 5d4142d5b6 chore: update sv.json (#3896)
* Update sv.json

Some small typos

* Rename sv.json to sv-SE.json
2023-11-08 10:14:13 +08:00
Mathias Mogensen fe23183aef feat: add placeholder to card editor (#3870) 2023-11-07 15:58:22 +01:00
Lucas.Xu 8116ea1dba feat: adjust math_equation block and image block on mobile platform (#3890)
* feat: add image toolbar entry

* feat: add ... buttos on math_equation and image block

* fix: review issues

* feat: add copy link and save image to gallery

* feat: support redo / undo on mobile toolbar
2023-11-07 15:24:32 +08:00
Lucas.Xu 3e6529aeb8 chore: add Roboto Mono font family and its regular and italic variants as assets (#3876) 2023-11-06 16:44:21 +08:00
Richard Shiueandnathan c4fc60612f feat: add new group (#3854)
* feat: implement backend logic

* fix: did_create_row not working properly

* fix: did_delete_group not working properly

* fix: test

* chore: fix clippy

* fix: new card not editable and in wrong position

* feat: imlement UI for add new stack

* test: add integration test

* chore: i18n

* chore: remove debug message

* chore: merge conflict

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-11-06 16:17:05 +08:00
Richard Shiue 4d82bb5322 chore: move field width to field settings (#3830)
* refactor: remove unnecessary builder

* feat: add width to field settings

* refactor: field settings logic

* chore: oopsies

* chore: implement UI

* chore: remove GridFieldCellEquatable

* test: rust-lib test fix
2023-11-06 14:48:59 +08:00
Nathan.foooandRichard Shiue 2b684ae7bf test: rename group test (#3790)
* refactor: rename group

* test: add rename group test

* chore: add group operation interceptor

* refactor: impl interceptor trait

* chore: update type option when group change

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-11-06 14:39:31 +08:00
Richard Shiue eb54cf99d4 fix: calendar event editor field name overflow (#3877) 2023-11-06 13:03:32 +08:00
Affif MukhlashinandLucas.Xu 85af82acbe chore: update translations for Indonesian (#3864)
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-06 11:05:42 +08:00
Nathan.fooo 3434d447a7 chore: update collab rev (#3874) 2023-11-06 00:47:20 +08:00
Nathan.fooo 1025b6d553 fix: af cloud sync auth (#3873)
* feat: open workspace

* chore: update env docs

* fix: invalid user callback

* fix: token invalid

* chore: update

* chore: update

* chore: update

* chore: fix test

* chore: fix tauri build
2023-11-05 14:00:24 +08:00
Mathias Mogensen b35d6131d4 feat: inline page reference (#3859)
* feat: more methods of inserting page reference

* test: add tests for inserting document reference

* chore: remove unused import

* chore: update editor ref

* tests: fix test with an interim solution
2023-11-03 21:30:24 +01:00
Yijing Huang bc502c9c5b chore: improve share button text color (#3868) 2023-11-03 12:09:12 -07:00
Kilu.Heandfangwufeng-v 5f49c1748f Fix/tauri warning to error (#3869)
* feat: sort basic function

* fix: eslint error

* fix: deal with conflict

* fix: prevent submit eslint warning code

* fix: modify tauri warning to error

---------

Co-authored-by: fangwufeng-v <fangwufeng.v@gmail.com>
2023-11-03 15:13:49 +08:00
Yijing HuangandLucas.Xu 73ea1a0685 feat:add toast in trash and confirm dialog + fix issues from launch review (#3787)
* chore: improve trash button

* feat: improve restore all&delete all

* refactor: add showFlowyMobileConfirmDialog

* feat: add toast in delete/restore single file

* refactor: refactor to TrashActionType enum

* fix: text invisible in signin page in dark mode

* feat: add FlowyMobileErrorStateContainer to display error state

* refactor: add FlowyMobileStateContainer to handle empty or error state

- Replace MobileErrorPage by FlowyMobileStateContainer.error
- Implement app version in reporting issue on github
- Implement FlowyMobileStateContainer in trash,setting,favorite and mobile view page

* refactor: unify bottom sheet style

- Unify bottom sheet style in add new page, page action, and trash action
- Add icon color in BottomSheetActionWidget for future use
- Add theme color in MobileBottomSheetDragHandle

* chore: unify Appbar style

* chore: remove the more button when trash list is empty

* fix: show bottom sheet error

* fix: fix merge and ui issue

* refactor: refactor ViewPageBottomSheet and origanize code

* chore: add icon color for favorite button

* fix: add missing icon color and delete comments

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-11-02 11:15:15 -07:00
Mathias Mogensen a93d325e6a fix: notification actions lemonade darkmode (#3862) 2023-11-02 17:17:30 +01:00
Kilu.He dc0af0f4c1 feat: support convert external data to nested json (#3848)
* feat: support convert external data to nested json

* fix: add some comment

* fix: code review

* fix: code review

* fix: code view

* fix: code view

* fix: update tauri cargo lock file

* fix: remove reduant function

* fix: parse dir attribute in element

* fix: add comment about parse dir

* fix: code review

* fix: code review

* fix: code review

* fix: code review
2023-11-02 22:13:29 +08:00
Lucas.Xu 1ad85416d8 fix: unable to build macOS universal package on x86 machine (#3863)
* chore: don't use cache when building release package

* fix: set ARCHS = ARCHS_STANDARD on macOS
2023-11-02 15:24:35 +08:00
Lucas.Xu c34a7a92fb feat: support customizing page icon (#3849)
* chore: don't use cache when building release package

* feat: refactor icon widget design

* feat: sync the emoji between page and view

* feat: use cache to store the emoji data to prevent reloading

* feat: customize the emoji item builder

* feat: add i18n and shuffle emoji button

* fix: integration test

* feat: replace emoji picker in Grid and slash menu

* feat: support adding icon on mobile platform

* feat: support adding and removing icon on mobile

* test: add integration tests
2023-11-02 15:24:17 +08:00
Nathan.fooo 21d34d1fe0 chore: update collab rev (#3852) 2023-11-01 14:47:25 +08:00
Nathan.fooo 3e088d48ac refactor: fav and workspace (#3837)
* refactor: workspace

* chore: update collab rev

* test: add data migration test

* fix: test

* fix: tauri build

* test: fix bloc test

* test: fix bloc test

* test: fix bloc test

* chore: restore magic codde
2023-11-01 11:45:35 +08:00
Mathias Mogensen 54dbcb7c5e fix: link to page dialog offset (#3840) 2023-10-31 20:11:32 +01:00
Lucas.Xu 59dff54edb chore: bump version 0.3.7 (#3832) 2023-10-31 09:49:14 +08:00
Mathias Mogensen d358e18f33 fix: add card at the beginning (#3835) 2023-10-30 17:34:37 +01:00
Kilu.He dd9b1fb78f feat: support converting documents to JSON, HTML, or TEXT. (#3811)
* feat: support converting documents to JSON, HTML, or TEXT

* fix: modify the comment

* fix: modify the comment
2023-10-30 12:50:31 +08:00
Nathan.fooo e08a1a6974 feat: enable dispatch event using single thread (#3828)
* refactor: lib dispatch

* chore: type def

* chore: type def

* fix: local set spawn

* chore: replace tokio spawn

* chore: update log

* chore: boxed event

* chore: tauri lock
2023-10-30 12:35:06 +08:00
Richard Shiue 7f4e7e6aa0 chore: bump af board ver (#3825)
* chore: bump af board ver

* fix: select card cell popover opening
2023-10-30 10:13:47 +08:00
Richard Shiue 18bd91936c fix: more board fixes (#3821)
* fix: null check value

* refactor: remove unnecessary blocbuilder

* fix: missing checkbox icon at top of board column
2023-10-29 12:51:34 +08:00
Richard Shiue b9a25f449f refactor: hide ungrouped feature (#3817)
* refactor: remove unused notification and listener

* revert: remove hide_ungrouped from group settings

* chore: add board layout setting

* chore: listen to layout settings on ui

* fix: duplicated group controller initialization

* chore: add a tooltip to the ungrouped items button

* chore: trailing comma
2023-10-29 11:26:49 +08:00
Richard Shiue 993532a2f0 fix: edit card title not working (#3819) 2023-10-28 23:13:27 +08:00
Nikhil RajandRichard Shiue 8a735799c6 Added tooltip when hovering over No-Data (#3612)
* Added tooltip when hovering over NO-Data

* chore: i18n for tooltip

* fix: wrong token

* chore: use flowytooltip

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-10-28 22:11:32 +08:00
Kritarth Sharma 197da5f425 fix: removed the parent padding and instead applied padding individually. (#3814)
* fix: Removed the parent padding and instead applied individual padding to each child to ensure it doesn't affect the sidebar divider.

* chore: Addressed comments and made changes
2023-10-28 19:11:52 +08:00
Nathan.fooo e28e5a0649 refactor: rename group (#3815)
* chore: add group operation interceptor

* refactor: impl interceptor trait

* chore: update type option when group change

* test: fix test
2023-10-28 11:48:28 +08:00
Lucas.Xu 09b4e19c9d feat: enable mobile view item drag-and-drop reordering (#3812)
* feat: enable mobile view item draggable

* fix: dragging the view doesn't disable hover effect
2023-10-27 22:42:35 +08:00
Richard Shiue 653c831473 fix: board unit test fix (#3813)
* fix: board unit test fix

* fix: oopsies
2023-10-27 22:33:45 +08:00
Lucas.Xu a2f2cdebb7 feat: set the default font family to Poppins on mobile (#3810) 2023-10-27 15:19:37 +08:00
Lucas.Xu 59e0a1325e fix: mobile page issues and improvements (#3809)
* chore: update connectivity plus to 5.0.1

* feat: update favorite status on time

* fix: text overflow

* feat: implement ... button in editor page

* fix: align the icon and the text on the favorite page

* feat: enable feedback when tapping icons
2023-10-27 13:36:09 +08:00
Mayur Mahajan c0446d7a96 chore: update de translation for select option (#3804) 2023-10-27 13:34:44 +08:00
Devas45 1fbee02731 fix: german date format (#3806) 2023-10-27 11:44:44 +08:00
dodaucy 102fdbce5c fix: change appflowy.io link from http to https (#3808) 2023-10-27 11:38:58 +08:00
Richard Shiue 71c6beb882 chore: adjust placeholder color for dark theme (#3799) 2023-10-26 22:39:43 +08:00
Richard Shiue ce83042317 chore: improve checklist ui (#3798) 2023-10-26 22:24:23 +08:00
Bryan Olivares 03598d3f22 fix: plus symbol in select option overflows (#3789)
* Fixed overflow problem for plus symbol

* Wrapping SizedBox with Flexible is not needed
2023-10-26 22:03:43 +08:00
Shreesh Nautiyal c2eb2014a3 feat: segmented checklist progress bar (#3770)
* feat: added segments to the checklist progress bar

* chore: display empty progress bar in checklist editor when no tasks added

* refactor: used Container to represent segments

* refactor: implemented segments using Flexible and generated them using List.generate
2023-10-26 18:28:55 +08:00
Lucas.Xu 9416ba1bfc feat: add new database on mobile platform (#3788)
* chore: downgrade clipboard package

* fix: update i18n in the favorite page

* fix: update the favorite icon

* feat: support add new database

* chore: disable cache in unit test

* chore: bump version 0.3.7
2023-10-26 11:57:14 +08:00
Richard Shiue 8c3984d21a feat: allow hiding ungrouped stack (#3752)
* feat: allow hiding ungrouped stack

* chore: add notifications and listeners

* chore: implement UI

* fix: field info update

* chore: more responsive notification

* chore: read the right configurations

* feat: add ungrouped button

* fix: new board not getting isGroupField

* feat: refresh the counter

* fix: item count update

* chore: apply code suggestions from Mathias

* chore: yolo through tests

* chore: UI fix

* chore: code cleanup

* chore: ungrouped item count fix

* chore: same as above
2023-10-26 11:48:58 +08:00
Generic-Ripe 1883dd6d7c Update sv.json (#3778)
Some small changes of errors and small improvements of readability.
2023-10-26 10:44:50 +08:00
Regulus Corneas a354f9fe52 chore: update french translation (#3774)
* inlang: update translations

* inlang: update translations

* inlang: update translations
2023-10-26 10:44:18 +08:00
Richard Shiue 41e2c74b5e feat: save card orders (#3730) 2023-10-26 10:05:43 +08:00
Mathias Mogensen 74d9d427bd feat: show block in notification item (#3736)
* feat: show block in notification item

* feat: jump to block action

* fix: conflict after merge main

* fix: missing import after merge main
2023-10-26 09:41:03 +08:00
Mathias MogensenandRichard Shiue aa27c4e6d4 Feat: rename stack inline (#3781)
* feat: rename stack in-line

* feat: rename stack in-line

* chore: compiler issues

* fix: conflicts and cleaning

* fix: code lost after merge

* test: fix failing rust tests

* fix: tauri localization wrong keys

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-10-26 09:38:37 +08:00
Mathias Mogensen f40ae9ff25 fix: what is new button broken link (#3785) 2023-10-25 21:05:28 +02:00
Mathias Mogensen e66087861b feat: insert date from slash menu (#3783) 2023-10-25 19:31:21 +02:00
Lucas.Xu 147637fcf5 fix: iOS TestFlight issues (#3776)
* fix: transparent icons on iOS platform

* fix: remove unused unit tests

* chore: update flutter version

* feat: support building release packages for iOS and Android

* fix: integration test failed randomly

* chore: remove windows CI cache

* chore: update info.plist

* feat: build iOS and Android in Release mode

* chore: update editor version

* chore: don't cache flutter when testing

* chore: run unit test on Windwos
2023-10-25 23:33:46 +08:00
Nathan.fooo 48582cb718 test: Af cloud workspace member (#3779)
* chore: implement workspace memeber events

* chore: add workspace member test

* chore: fix fmt
2023-10-25 21:35:47 +08:00
Yijing Huang ad21a61ffb feat: mobile setting page, trash page and recent file UI with mock data (#3734) 2023-10-25 21:29:50 +08:00
Nathan.fooo d34eec1d99 chore: rename files name that might cause ci fail (#3777) 2023-10-25 15:25:31 +08:00
Lucas.Xu 95aeac201f chore: remove the unit tests of Windows and macOS (#3771)
* chore: remove the unit tests of Windows and macOS

* chore: update pubspec

* chore: update languages
2023-10-25 09:21:20 +08:00
Nathan.fooo cceee80799 fix: anon user error (#3772)
* fix: anon user error

* ci: fix tests
2023-10-24 23:13:51 +08:00
Nathan.fooo 71f80be8f7 feat: save user metadata (#3754)
* feat: save user metadata

* chore: update client api

* refactor: separate test methods

* chore: save updated at

* chore: clippy

* chore: fix test
2023-10-24 20:11:06 +08:00
16a4babdca fix: The appearance of slash menu didn't change along with theme mode changes (#3630) (#3706)
* fix: The appearance of slash menu didn't change along with theme mode changes (#3630)

* revert: pubspec.lock change

* fix: use context inside of function

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Co-authored-by: Yijing Huang <hyj891204@gmail.com>
2023-10-24 17:43:25 +08:00
Nebiyu 85c0622245 feat: add amharic translation (#3732) 2023-10-24 17:41:46 +08:00
Pedro Coelho e3410ec568 chore: update pt-PT translations (#3712)
* inlang: update translations

* inlang: update translations
2023-10-24 17:16:48 +08:00
ZakandLucas.Xu c0b0f12b0d fix: font size text being displayed out of range. (#3766)
* fix: font size text being displayed out of range.

* chore: refactor code

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-10-24 14:04:13 +08:00
Mayur Mahajan 70a2b7d9ab fix: add light and dark theme for codeblock (#3748)
* feat: add separate themes for codeblock

* feat: light and dark themes in codeblock
2023-10-24 14:01:34 +08:00
Lucas.Xu a84c47dc33 feat: android deeplink and update icons (#3769)
* feat: android deeplink and update icons

* chore: remove integration test
2023-10-24 13:52:55 +08:00
Lucas.Xu 56c5d69b0f feat: redefine i18n for editor (#3768) 2023-10-24 13:39:05 +08:00
Richard Shiue 6c3d7d2079 feat: show checklist items inline in row page (#3737)
* feat: show checklist items inline in row page

* fix: tauri build
2023-10-24 10:15:28 +08:00
Mohammad Zolfaghari 25a98cda81 ci: reduce build time (#3519) 2023-10-23 22:17:11 +08:00
Mathias Mogensen cd6e133c86 fix: notification settings initial state (#3763) 2023-10-23 14:51:59 +02:00
Richard Shiue b16a102f85 chore: improve setting tab bar dropdown (#3756)
* chore: improve setting tab bar dropdown

* test: fix integration tests
2023-10-23 19:23:27 +08:00
Lucas.Xu d51c7f382f feat: implement personal / favorites folder on the mobile platform (#3723) 2023-10-23 18:35:07 +08:00
Richard Shiue a57ca5c0cb fix: integration tests failing on Sundays (#3753) 2023-10-23 11:44:04 +08:00
Nathan.fooo 1e9137fcfe chore: update client api commit id (#3745)
* chore: update client api commit id

* chore: fix test

* chore: remove check_visual_studio_installation task

* chore: update client api
2023-10-23 11:43:31 +08:00
Shreesh Nautiyal 8e5b6b6e27 fix: the horizontal scrollbar disappearing in grid view (#3751) 2023-10-23 10:30:47 +08:00
Kilu.He 7e101b8bf1 fix: slash command panel bugs (#3722) 2023-10-23 10:25:47 +08:00
Lucas.Xu bf0cfa798c fix: windows CI build failed (#3741) 2023-10-22 01:04:38 +08:00
Richard Shiue 1793a28cbc fix: calendar event card not displaying as intended (#3731) 2023-10-19 18:19:50 +08:00
Lucas.Xu e565d0ee32 feat: support building on Android (#3713)
* feat: support building on Android

* chore: add CI for mobile platform
2023-10-19 09:55:23 +08:00
Sumit BanwakadeandRichard Shiue f60462a853 fix: side panel animation (#3605)
* fix: side panel animation

* Fix: Side Panel Animation Changes

* Fix:Panel Animation

* fix:updated animation to easeOutQuad

* fix: updated animation to easeOutQuad

* Fix:Panel Side Animation

* fix:panel side animation

* chore: restore settings.json

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
2023-10-18 15:48:26 +08:00
Mathias Mogensen 966547faa0 fix: reminder launch review (#3716) 2023-10-17 14:48:58 +08:00
Muhammad Saad Tanveer 3647af44c9 fix: Shortcut settings Reset to default is missing bottom margin #3710 (#3715) 2023-10-17 05:47:07 +02:00
Lucas.Xu 25b4a647b0 fix: unable to export image to markdown (#3709) 2023-10-16 15:56:30 +08:00
Lucas.Xu c6e3c1fd7c feat: customizing the background of a block with theme color (#3691) 2023-10-16 14:11:05 +08:00
ルビーDog 4fd35d0de4 feat: improve translations ja_JP (#3702) (#3705) 2023-10-16 10:56:06 +08:00
Lucas.Xu 7406c5e6a5 feat: add toggle list and callout node parser (#3700) 2023-10-16 10:09:33 +08:00
CrazyRikin aa70885b21 feat: added hindi translation (#3575) 2023-10-15 22:13:14 +08:00
Yijing Huang 8699c9c125 fix: lemonade theme issues (#3686) 2023-10-15 22:12:25 +08:00
Pedro Coelho bc758e0b06 chore: update translations pt-PT (#3687) 2023-10-15 22:12:01 +08:00
Jakob Gerhardt e38980ccc3 chore: update translations de-DE (#3693) 2023-10-15 22:11:28 +08:00
Verdy Bangkit 8dd180046f chore: update translations id_ID and ru_RU (#3701) 2023-10-15 22:10:41 +08:00
Lucas.Xu 0cd2726752 chore: disable toolbar in code block (#3682) 2023-10-15 22:01:17 +08:00
Lucas.Xu 11daa15b89 feat: auto pop up the menu after inserting image block (#3698) 2023-10-15 13:04:24 +08:00
Lucas.Xu 8436bc6144 fix: the disk space of CI machines always runs out (#3689) 2023-10-14 20:37:44 +08:00
Ekaksh JanwejaandLucas.Xu 59851f46b7 feat: edit the field by clicking on the drag icon (#3656)
* feat: edit the field by clicking on the drag icon

* Added localization

* Added .tr() function

* fix: BlockActionButton only show when _isFieldHover is true.

* fix: BlockActionButton only show when _isFieldHover is true.

* fix: Worked on requested changes

* fix: Fixed Location of Field Popover

* fixed pubspec.lock

* Updated pubspec.lock

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-10-13 23:47:49 +08:00
Sarthak Kimtani 62f1d6eb82 fix: 3620 unchecked checkbox color (#3685) 2023-10-13 21:06:13 +08:00
Nathan.fooo ec80f72c8f feat: af cloud database (#3684)
* chore: forece user to logout when token is invalid

* chore: update client api rev
2023-10-12 20:25:00 +08:00
Richard Shiue b2c80981cc fix: build app (#3681) 2023-10-11 22:46:32 -07:00
Yijing Huang 8fa425a76c chore: bump version 0.3.6 (#3680) 2023-10-12 13:14:37 +08:00
Mathias Mogensen ebe112581d feat: toggle notifications on/off (#3672) 2023-10-12 12:54:08 +08:00
Mathias Mogensen bc8f35d7db feat: reminder improvements (#3658) 2023-10-12 10:19:36 +08:00
Nathan.fooo 058eeec932 feat: implement file storage using appflowy cloud (#3675)
* feat: implement file storage using appflowy cloud

* chore: clippy
2023-10-12 09:54:45 +08:00
Lucas.Xu 8e10cba8e5 feat: support toggling the markdown style by shortcuts (#3674) 2023-10-11 23:12:23 +08:00
Yijing Huang 7a24f6b6f0 feat: add lemonade theme color (#3666) 2023-10-11 22:01:05 +08:00
Richard Shiue 4f40945458 fix: integration tests (#3673)
* fix: fix integration tests

* fix: initiate isScreenSmall properly
2023-10-11 20:36:10 +08:00
Nathan.fooo e59870e421 refactor: rename flowy-test to event-integration (#3667) 2023-10-11 20:02:09 +08:00
Tran Nguyen Sinh cf521fe20b chore: update translations for Vietnamese (#3632) 2023-10-11 17:15:59 +07:00
Mathias Mogensen f0d47ee50c fix: esc to close date picker dialog (#3648) 2023-10-11 05:49:32 +02:00
Lucas.Xu 2a5d393c9f fix: missing dependency (libnotify) in appimage (#3665) 2023-10-11 09:46:59 +08:00
Shreesh Nautiyal 98e0b832ec feat: 1674 Auto-hide sidebar when re-sizing the window (#3659)
* feat: 1674 Auto-hide sidebar when re-sizing the window

* chore: removed unnecessary print statements

* chore: updated to a more approprite name for 'screenSmall' event
2023-10-10 19:26:11 +02:00
Nathan.fooo 77e7cbe9ec chore: sync document (#3653)
* chore: sync document

* chore: update collab rev

* chore: update collab rev
2023-10-10 19:05:55 +08:00
Dhruv Sharma acd53eb640 fix: correct svg for row actions (#3664)
Closes: #3450
2023-10-10 17:30:44 +08:00
Lucas.Xu ffdf5d24a0 fix: openAI image expiration (#3660)
* feat: save the openAI image to local storage

* feat: support rendering error block

* fix: enter on Toggle list moves heading down without contents
2023-10-10 12:43:31 +08:00
Dhruv Sharma b247a49417 chore: resolve issue (#3621) 2023-10-09 20:47:24 +02:00
Lucas.Xu dace02d34d feat: generate image by Stability AI / openAI (#3642) 2023-10-09 23:14:24 +08:00
Muhammad Saad Tanveer 41d4351176 feat: 3625 Added Ukrainian Language (#3644) 2023-10-09 12:19:35 +08:00
Lucas.Xu d4bc575c03 fix: image block issues (#3637) 2023-10-07 13:45:38 +08:00
Nathan.fooo a59561aee3 chore: sign in with provider (#3592)
* chore: sign in with provider

* feat: implement oauth flow of appflowy cloud

* chore: rename env

* chore: fix deadlock

* fix: login bugs

* chore: clippyt

* chore: update client api

* chore: fmt
2023-10-07 09:58:44 +08:00
Mathias Mogensen 92523321f1 fix: notification button delayed tooltip (#3635) 2023-10-06 09:29:36 +02:00
Richard Shiue 537c9d0865 fix: wrong date selected in CDT (#3627) 2023-10-06 10:13:46 +08:00
Richard Shiue b4051c7e9f fix: url underline issue (#3618) 2023-10-05 17:35:50 +08:00
Richard Shiue 9e61133886 chore: bump version 0.3.5 (#3616) 2023-10-05 12:01:38 +08:00
Lucas.Xu 36f47f3636 feat: image block revamp (#3615) 2023-10-05 10:40:41 +08:00
Mayur Mahajan 40dcd13394 refactor: ui improvement in appearance (#3553) 2023-10-05 09:48:19 +08:00
Yijing Huang eb20c7c117 feat: emoji picker improvement (#3591) 2023-10-05 09:36:29 +08:00
Devanshu Rawat e9852a3934 fix: restore page banner ui improvement (#3604) 2023-10-05 09:34:36 +08:00
Alazar GeneneandAlazar Genene 78d8ec9a3e fix: use Image.file instead of DecoratedBox and FileImage (#3606)
Co-authored-by: Alazar Genene <alazargenene@Alazars-MacBook-Pro-2.local>
2023-10-04 23:48:31 +02:00
Juan David 4220309cf8 Updated translation part in project readme (#3609) 2023-10-04 15:50:42 +02:00
Jaskeerat Singh 812af0979e Fix: Missing WhiteSpace b/w Primary Field Text and Row Icon (#3602)
* Update link to OS Specific Development

* fix: Missing white space b/w primary field text & row's icon

* fix: Updated emoji padding
2023-10-04 11:50:26 +02:00
Narayan cca5005541 fix: remove current page link option in page reference (#3600)
* fix: remove current page link option in page reference

* fix: removed context and added view id as parameter
2023-10-04 11:49:22 +02:00
Mathias Mogensen 9306d4a4ee docs: update links in readm (#3589) 2023-10-04 11:35:37 +02:00
Ahsan AhmadandLucas.Xu 3ab1ff5e73 fix:The placeholder text for URL cells shouldn't be underlined (#3565)
* fix:The placeholder text for URL cells shouldn't be underlined

* Update frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/url_cell/url_cell.dart

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-10-04 11:35:02 +02:00
Aditya AroraandMathias Mogensen 05fa306782 feat: Delay tooltip presentations by 300ms (#3558)
* feat:added wait duration to ToolTip widgets

* feat:added wait Duration to more tooltips

* feat:added wait Duration to more_button tooltip

* fix: use flowytooltip

* fix:undo install_macos.sh file

* fix:undo install_macos.sh file

* fix:refactored FlowyTooltip.delayedTooltip to FlowyTooltip.delayed

---------

Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
2023-10-04 11:34:44 +02:00
Mathias Mogensen d054439df4 fix: provide default options for inline actions always (#3601) 2023-10-03 18:07:46 +02:00
Jaskeerat Singh 15aaacc4b7 Update link to OS Specific Development (#3590) 2023-10-02 20:12:02 +02:00
Mathias Mogensen ef9de52cbc docs: update link to conventions (#3581) 2023-10-02 15:48:02 +02:00
Lucas.Xu 8d9d0e9358 chore: bump version 0.3.4 (#3572)
* chore: bump version 0.3.4

* fix: docker file build
2023-10-02 20:48:56 +08:00
7f44b181bd feat: integrate client-api (#3430)
* chore: update client-api rev

* chore: update collab rev id

* feat: add sign_in_request and import shared entity

* feat: added to userworkspace from af_workspace

* chore: add script to update the client-api rev id

* chore: update client-api rev

* feat: add workspaces api

* feat: added check user

* chore: config

* chore: update client_api version

* chore: ws connect

* chore: ws connect

* chore: update crate versions

* chore: rename event

* chore: update client-appi

* chore: set appflowy cloud env

* chore: add env template

* chore: update env name

* docs: update docs

* fix: check_user

* feat: impl sign_in_with_url

* feat: add file storage placeholders

* chore: update client-api

* chore: disable test

* feat: impl workspace add and remove

* chore: sign up test

* feat: select cover image on upload (#3488)

* fix: close popover after item selection in settings view (#3362)

* fix: close popover after item selection in settings view

* fix: add missing await before closing popover

* fix: find popover container by context instead of passing controllers around

* fix: add requested changes

* feat: close text direction settings popups after selection

* fix: clean up

* fix: restore theme value dropdown as StatefulWidget

* feat: openai and stabilityai integration (#3439)

* chore: create trait

* test: add tests

* chore: remove log

* chore: disable log

* chore: checklist ux flow redesign (#3418)

* chore: ux flow redesign

* chore: remove unused imports

* fix: allow creation of tasks of the same name

* chore: apply code suggestions from Mathias

* fix: add padding below field title text field (#3440)

* Fixed Issue no #3426

* Reversed the pubspec.lock mistaken update

* FIXED PADDING

* Fixed Padding issue on calender field edit popup

* chore: rename package name (#3501)

* fix: right icon size sam as left one (#3494)

* feat: enable removing user icon (#3487)

* feat: enable removing user icon

* fix: generate to true

* fix: review comments

* fix: more review comments

* fix: integration test and final changes

* fix: made cursor grab and background color when hovering on Appearance Options Buttons (#3498)

* chore: calendar UI polish (#3484)

* chore: update calendar theming

* feat: add event popup editor

* chore: new event button redesign and add card shadows

* chore: unscheduled events button

* chore: event title text field

* fix: focus node double dispose

* chore: show popover when create new event

* test: integrate some tests for integration testing purposes

* fix: some fixes and more integration tests

* chore: add more space between font item and font menu

* feat: add reset font button in toolbar

* feat: only show text direction toolbar item when RTL is enabled

* fix:  unable to change RTL of heading block

* test: add integration test for ltr/rtl mode

* chore: update inlang project settings (#3441)

* feat: using script to update the collab source. (#3508)

* chore: add script

* chore: update script

* chore: update bytes version

* chore: submit lock file

* chore: update test

* chore: update test

* chore: bump version

* chore: update

* ci: fix

* ci: fix

* chore: update commit id

* chore: update commit id

* chore: update commit id

* fix: is cloud enable

---------

Co-authored-by: Fu Zi Xiang <speed2exe@live.com.sg>
Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
Co-authored-by: Vincenzo De Petris <37916223+vincendep@users.noreply.github.com>
Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
Co-authored-by: Aryan More <61151896+aryan-more@users.noreply.github.com>
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Co-authored-by: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com>
Co-authored-by: Nitin-Poojary <70025277+Nitin-Poojary@users.noreply.github.com>
Co-authored-by: Jannes Blobel <72493222+jannesblobel@users.noreply.github.com>
2023-10-02 17:22:22 +08:00
Aman Negi 01c3fec5aa feat: improve snackbar UI style (#3562) 2023-10-02 15:14:40 +08:00
Mathias Mogensen 94a3a59001 fix: avoid non-null promise on null value (#3569) 2023-10-02 15:13:39 +08:00
Mathias Mogensen 4a433a3176 feat: reminder (#3374) 2023-10-02 15:12:24 +08:00
Ricky Putra f7749bdccc chore: add integration tests for user language settings (#3560) 2023-10-02 13:55:57 +08:00
Lucas.Xu c864e836ee feat: integrate find and replace into AppFlowy (#3566)
* chore: update editor version

* feat: redesign find and replace ui

* chore: update language file
2023-10-02 13:54:51 +08:00
Richard Shiue 0738b5f87d feat: show hidden fields in row detail page (#3545) 2023-10-02 10:52:22 +08:00
Anurag De 6198c3907f fix: updated githook helper link (#3563) 2023-10-02 10:07:51 +08:00
Ahsan AhmadandMathias Mogensen 891d794900 fix:Spacing above New row in grid (#3564)
* fix:Spacing above New row in grid

* revert: update frontend/appflowy_flutter/ios/Podfile.lock

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
2023-10-01 23:22:21 +02:00
Yijing Huang 890f52a00a feat: dandelion theme improvement (#3550) 2023-09-28 14:18:40 +08:00
Yijing Huang d007f98af6 fix: emoji picker menu issue (#3551) 2023-09-28 14:18:01 +08:00
Yijing Huang 15e9d65798 feat: go_router refactor and bottom navigation bar in mobile (#3459) 2023-09-28 14:17:38 +08:00
Lakhan Baheti 0626f0deb7 fix: on hover change_cover button correct mouse cursor (#3548) 2023-09-27 22:59:33 +08:00
Richard Shiue 007c649c31 fix: still show drag icon while dragging (#3547)
* fix: still show drag icon while dragging

* chore: use click cursor on windows
2023-09-27 20:02:44 +08:00
Norbert 34ea508f5b chore: update pl-PL translations (#3539) 2023-09-27 15:35:45 +08:00
fangwufeng-v f70aef68be feat: drag and drop a row in the Grid (#3376)
* feat: new style ui

* feat: drag row

* feat: hooks for auto scroll feature when dragging

* feat: shared UI status that control auto scroll when dragging row.

* feat: optimize the drag interaction UI effect

* feat: refactor drag positon

* feat: drag column header

* feat: fix review issue
2023-09-27 15:13:25 +08:00
Borris 61a31c90ee chore: update translations for id-ID (#3518) 2023-09-27 11:32:49 +08:00
Richard Shiue c7e3ed805a fix: checklist cell style for checklist cells (#3538) 2023-09-26 22:31:15 +08:00
Lucas.Xu d36a846425 chore: update CHANGELOG.md 2023-09-26 16:55:49 +08:00
Lucas.Xu a02ec98e9c fix: undo failed in nested list 2023-09-26 16:55:49 +08:00
Lucas.Xu 32c06cf1bf fix: clear selection when editing inline database view 2023-09-26 16:55:49 +08:00
Lucas.Xu cf1096b516 fix: undo failed in nested list 2023-09-26 16:55:49 +08:00
Lucas.Xu 938953d7b3 fix: unable to parse html text which contains <mark> tag (#3529) 2023-09-26 14:37:10 +08:00
Mathias Mogensen 949dab9afe fix: on hover/enter issue for view items (#3528) 2023-09-25 12:12:43 +02:00
Narayan 0996f5fd24 fix: missing the hand gesture icon in the text alignment options (#3509) 2023-09-24 21:42:11 +08:00
Lucas.Xu 6e887f1f12 chore: bump version 0.3.3 (#3517) 2023-09-24 20:28:31 +08:00
Richard Shiue ab9338eb89 fix: some issues with the end date (#3495) 2023-09-24 20:26:18 +08:00
Lakhan Baheti fd4088aed0 fix: grid theming to bottom row count number (#3510)
* fix: theming to bottom count number

* refactor: Row to RichText
2023-09-24 20:25:47 +08:00
Richard Shiue 375ff5ed6d refactor: use same bloc in grid and cards (#3511) 2023-09-24 20:24:38 +08:00
Ahsan Ahmad 847290d9a4 fix: remove max length of 30 while creating a new select option (#3513) 2023-09-24 19:14:25 +08:00
Nathan.fooo 56687581f2 feat: using script to update the collab source. (#3508)
* chore: add script

* chore: update script

* chore: update bytes version

* chore: submit lock file
2023-09-24 15:50:58 +08:00
Jannes Blobel 3be39f5e7b chore: update inlang project settings (#3441) 2023-09-23 23:41:56 +08:00
Lucas.Xu 1997231adf Merge pull request #3500 from LucasXu0/fix_032_launch_review_issues
fix launch review(v0.3.3) issues
2023-09-23 12:50:57 +08:00
Lucas.Xu 89face4f02 test: add integration test for ltr/rtl mode 2023-09-23 11:31:08 +08:00
Richard Shiue 37ddce3a29 chore: calendar UI polish (#3484)
* chore: update calendar theming

* feat: add event popup editor

* chore: new event button redesign and add card shadows

* chore: unscheduled events button

* chore: event title text field

* fix: focus node double dispose

* chore: show popover when create new event

* test: integrate some tests for integration testing purposes

* fix: some fixes and more integration tests
2023-09-23 09:47:48 +08:00
Nitin-Poojary 593df96b10 fix: made cursor grab and background color when hovering on Appearance Options Buttons (#3498) 2023-09-22 19:03:18 +02:00
Mathias Mogensen 1b966171c4 feat: enable removing user icon (#3487)
* feat: enable removing user icon

* fix: generate to true

* fix: review comments

* fix: more review comments

* fix: integration test and final changes
2023-09-22 15:20:07 +02:00
Lakhan Baheti 047f1a0b39 fix: right icon size sam as left one (#3494) 2023-09-22 12:25:27 +02:00
Lucas.Xu f2f3506b29 fix: unable to change RTL of heading block 2023-09-22 17:13:08 +08:00
Lucas.Xu 0ccced4b54 chore: rename package name (#3501) 2023-09-22 16:32:18 +08:00
Lucas.Xu f762a564b5 feat: only show text direction toolbar item when RTL is enabled 2023-09-22 15:59:21 +08:00
Lucas.Xu 57b78ee3c6 feat: add reset font button in toolbar 2023-09-22 15:49:11 +08:00
Lucas.Xu 5dfc470873 chore: add more space between font item and font menu 2023-09-22 13:53:14 +08:00
Aryan More d5f8ce5435 fix: add padding below field title text field (#3440)
* Fixed Issue no #3426

* Reversed the pubspec.lock mistaken update

* FIXED PADDING

* Fixed Padding issue on calender field edit popup
2023-09-22 11:15:18 +08:00
Richard Shiue 3c65a96b04 chore: checklist ux flow redesign (#3418)
* chore: ux flow redesign

* chore: remove unused imports

* fix: allow creation of tasks of the same name

* chore: apply code suggestions from Mathias
2023-09-22 09:33:24 +08:00
Nathan.fooo 6ba7fc0317 feat: openai and stabilityai integration (#3439)
* chore: create trait

* test: add tests

* chore: remove log

* chore: disable log
2023-09-21 12:41:52 +08:00
Vincenzo De Petris 37a5054ebd fix: close popover after item selection in settings view (#3362)
* fix: close popover after item selection in settings view

* fix: add missing await before closing popover

* fix: find popover container by context instead of passing controllers around

* fix: add requested changes

* feat: close text direction settings popups after selection

* fix: clean up

* fix: restore theme value dropdown as StatefulWidget
2023-09-21 11:23:28 +08:00
Mathias Mogensen 048434024b feat: select cover image on upload (#3488) 2023-09-21 04:02:39 +02:00
Nitin-Poojary 2c757e9b6c fix: set minimum width for grid fields to 50px (#3397)
* fix: set minimum width for grid field to 100px

* test: add grid field width test

* fix: field width should not be less then 50px

* test: grid field width should not be less then 50px

* fix: cursor-based resizing issue

* test: updated tests
2023-09-21 09:39:13 +08:00
Lucas.Xu 9c59e1487e feat: customize text font (#3467)
* feat: update UI in settings page

* feat: customzing font in document page

* fix: flutter analyze and format issues
2023-09-21 09:12:25 +08:00
Mathias Mogensen 4b9b723521 fix: add bottom border to new property column (#3486) 2023-09-21 03:10:41 +02:00
Vyshnav Ajith a389836897 Added Language Support for Urdu. Issue#3372 (#3469)
* Create ur.json

* Add files via upload

* changes

* Added Locale change to the supported Locales List

* Added Urdu in Language.dart

* Delete .vscode/launch.json

* Changed the icon for Calendar
2023-09-20 17:31:17 +02:00
Mathias Mogensen eec7723ce0 fix: tests for interacting with viewitem (#3472) 2023-09-20 23:14:04 +08:00
Lucas.Xu 2f938a331f Merge pull request #3468 from LucasXu0/fix_build_error_on_xcode15
fix: build error on Xcode 15
2023-09-20 20:32:28 +08:00
Lucas.Xu 847d7cb35a fix: build error on Xcode 15 2023-09-20 15:28:27 +08:00
Onyedika Israel Ukwueze 094f8fc307 fix: visual bug on board accessory 2023-09-19 16:02:19 +08:00
Yatendra Kumarandnathan e3f11ea9c0 feat: integrated openAI rust plugin (#3302)
* feat: create flowy-plugins

* feat: integrated openai service with interface

* feat: integrated openai api call

* fix: response in api

* fix: removed unused imports

* fix: remove parse.rs

* fix: macos version + removed print

* fix: removed debugPrint + changed deployment target

* fix: android project+removed gesture detector

* fix: removed unused imports

* chore: fix compile

* chore: rever changes

* chore: rever changes

* chore: fix clippy warnings

* chore: rename

* chore: fix compile error

* chore: remove dart ai

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-09-19 10:37:37 +08:00
Richard Shiueandnathan 124d435f09 feat: add end date to time cell data (#3369)
* feat: add end date to time cell data

* feat: implement ui for end time

* test: add date to text test

* chore: clippy warnings

* fix: unexpected time parsing

* fix: fix the date logic when toggling end date

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-09-19 09:58:15 +08:00
Mathias Mogensen b700f95c7f fix: do not rebuild hover on item selection (#3423) 2023-09-18 16:39:30 +08:00
3595 changed files with 201019 additions and 122778 deletions

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ test "" = "$(grep '^Signed-off-by: ' "$1" |
if [ $? -ne 0 ]
then
printError "Please fix your commit message to match AppFlowy coding standards"
printError "https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/code-submission-guidelines#commit-message-guidelines"
printError "https://docs.appflowy.io/docs/documentation/software-contributions/conventions/git-conventions"
exit 1
fi
+1 -1
View File
@@ -21,7 +21,7 @@ Before you mark this PR ready for review, run through this checklist!
#### PR Checklist
- [ ] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides)
- [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions)
- [ ] I've listed at least one issue that this PR fixes in the description above.
- [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
- [ ] All existing tests are passing.
+104
View File
@@ -0,0 +1,104 @@
name: Flutter Integration Test
description: Run integration tests for AppFlowy
inputs:
os:
description: "The operating system to run the tests on"
required: true
flutter_version:
description: "The version of Flutter to use"
required: true
rust_toolchain:
description: "The version of Rust to use"
required: true
cargo_make_version:
description: "The version of cargo-make to use"
required: true
rust_target:
description: "The target to build for"
required: true
flutter_profile:
description: "The profile to build with"
required: true
runs:
using: "composite"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.rust_toolchain }}
target: ${{ inputs.rust_target }}
override: true
profile: minimal
- name: Export pub environment variables and add to PATH
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "PUB_CACHE=$LOCALAPPDATA\\Pub\\Cache" >> $GITHUB_ENV
fi
shell: bash
- name: Install flutter
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ inputs.flutter_version }}
cache: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ inputs.os }}
workspaces: |
frontend/rust-lib
cache-all-crates: true
- uses: taiki-e/install-action@v2
with:
tool: cargo-make@${{ inputs.cargo_make_version }}, duckscript_cli
- name: Install prerequisites
working-directory: frontend
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev
elif [ "$RUNNER_OS" == "Windows" ]; then
vcpkg integrate install
elif [ "$RUNNER_OS" == "macOS" ]; then
echo 'do nothing'
fi
cargo make appflowy-flutter-deps-tools
shell: bash
- name: Build AppFlowy
working-directory: frontend
run: cargo make --profile ${{ inputs.flutter_profile }} appflowy-core-dev
shell: bash
- name: Run code generation
working-directory: frontend
run: cargo make code_generation
shell: bash
- name: Flutter Analyzer
working-directory: frontend/appflowy_flutter
run: flutter analyze .
shell: bash
- name: Compress appflowy_flutter
run: tar -czf appflowy_flutter.tar.gz frontend/appflowy_flutter
shell: bash
- uses: actions/upload-artifact@v4
with:
name: ${{ github.run_id }}-${{ matrix.os }}
path: appflowy_flutter.tar.gz
@@ -0,0 +1,78 @@
name: Flutter Integration Test
description: Run integration tests for AppFlowy
inputs:
test_path:
description: "The path to the integration test file"
required: true
flutter_version:
description: "The version of Flutter to use"
required: true
rust_toolchain:
description: "The version of Rust to use"
required: true
cargo_make_version:
description: "The version of cargo-make to use"
required: true
rust_target:
description: "The target to build for"
required: true
runs:
using: "composite"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.RUST_TOOLCHAIN }}
target: ${{ inputs.rust_target }}
override: true
profile: minimal
- name: Install flutter
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ inputs.flutter_version }}
cache: true
- uses: taiki-e/install-action@v2
with:
tool: cargo-make@${{ inputs.cargo_make_version }}
- name: Install prerequisites
working-directory: frontend
run: |
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager
shell: bash
- name: Enable Flutter Desktop
run: |
flutter config --enable-linux-desktop
shell: bash
- uses: actions/download-artifact@v4
with:
name: ${{ github.run_id }}-ubuntu-latest
- name: Uncompressed appflowy_flutter
run: tar -xf appflowy_flutter.tar.gz
shell: bash
- name: Run Flutter integration tests
working-directory: frontend/appflowy_flutter
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt-get install network-manager
flutter test ${{ inputs.test_path }} -d Linux --coverage
shell: bash
+126
View File
@@ -0,0 +1,126 @@
# name: Android CI
# on:
# push:
# branches:
# - "main"
# paths:
# - ".github/workflows/mobile_ci.yaml"
# - "frontend/**"
# - "!frontend/appflowy_tauri/**"
# pull_request:
# branches:
# - "main"
# paths:
# - ".github/workflows/mobile_ci.yaml"
# - "frontend/**"
# - "!frontend/appflowy_tauri/**"
# env:
# CARGO_TERM_COLOR: always
# FLUTTER_VERSION: "3.19.0"
# RUST_TOOLCHAIN: "1.75"
# CARGO_MAKE_VERSION: "0.36.6"
# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true
# jobs:
# build:
# if: github.event.pull_request.draft != true
# strategy:
# fail-fast: true
# matrix:
# os: [macos-14]
# runs-on: ${{ matrix.os }}
# steps:
# - name: Check storage space
# run: df -h
# # the following step is required to avoid running out of space
# - name: Maximize build space
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /opt/ghc
# sudo rm -rf "/usr/local/share/boost"
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# sudo docker image prune --all --force
# sudo rm -rf /opt/hostedtoolcache/codeQL
# sudo rm -rf ${GITHUB_WORKSPACE}/.git
# sudo rm -rf $ANDROID_HOME/ndk
# - name: Check storage space
# run: df -h
# - name: Checkout source code
# uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# distribution: temurin
# java-version: 11
# - name: Install Rust toolchain
# id: rust_toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# override: true
# profile: minimal
# - name: Install flutter
# id: flutter
# uses: subosito/flutter-action@v2
# with:
# channel: "stable"
# flutter-version: ${{ env.FLUTTER_VERSION }}
# - uses: gradle/gradle-build-action@v3
# with:
# gradle-version: 7.4.2
# - uses: davidB/rust-cargo-make@v1
# with:
# version: "0.36.6"
# - name: Install prerequisites
# working-directory: frontend
# run: |
# rustup target install aarch64-linux-android
# rustup target install x86_64-linux-android
# cargo install --force duckscript_cli
# cargo install cargo-ndk
# if [ "$RUNNER_OS" == "Linux" ]; then
# sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
# sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
# sudo apt-get update
# sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
# sudo apt-get install keybinder-3.0 libnotify-dev
# sudo apt-get install gcc-multilib
# elif [ "$RUNNER_OS" == "Windows" ]; then
# vcpkg integrate install
# elif [ "$RUNNER_OS" == "macOS" ]; then
# echo 'do nothing'
# fi
# cargo make appflowy-flutter-deps-tools
# shell: bash
# - name: Build AppFlowy
# working-directory: frontend
# run: |
# cargo make --profile development-android appflowy-android-dev-ci
# - name: Run integration tests
# # https://github.com/ReactiveCircus/android-emulator-runner
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 32
# arch: arm64-v8a
# disk-size: 2048M
# working-directory: frontend/appflowy_flutter
# script: flutter test integration_test/runner.dart
+28
View File
@@ -0,0 +1,28 @@
name: Build Bot
on:
issue_comment:
types: [created]
jobs:
dispatch_slash_command:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
# get build name from pubspec.yaml
- name: Get build version
working-directory: frontend/appflowy_flutter
id: get_build_name
run: |
echo "fetching version from pubspec.yaml..."
echo "build_name=$(grep 'version: ' pubspec.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT
- uses: peter-evans/slash-command-dispatch@v4
with:
token: ${{ secrets.PAT }}
commands: build
static-args: |
ref=refs/pull/${{ github.event.issue.number }}/head
build_name=${{ steps.get_build_name.outputs.build_name }}
+42
View File
@@ -0,0 +1,42 @@
name: build
on:
repository_dispatch:
types: [build-command]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: notify appflowy_builder
run: |
platform=${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}
build_name=${{ github.event.client_payload.slash_command.args.named.build_name }}
branch=${{ github.event.client_payload.slash_command.args.named.ref }}
build_type=""
arch=""
if [ "$platform" = "android" ]; then
build_type="apk"
elif [ "$platform" = "macos" ]; then
arch="universal"
fi
params=$(jq -n \
--arg ref "main" \
--arg repo "LucasXu0/AppFlowy" \
--arg branch "$branch" \
--arg build_name "$build_name" \
--arg build_type "$build_type" \
--arg arch "$arch" \
'{ref: $ref, inputs: {repo: $repo, branch: $branch, build_name: $build_name, build_type: $build_type, arch: $arch}} | del(.inputs | .. | select(. == ""))')
echo "params: $params"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/AppFlowy-IO/AppFlowy-Builder/actions/workflows/$platform.yaml/dispatches \
-d "$params"
+1 -2
View File
@@ -5,8 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build the app
shell: bash
+277 -46
View File
@@ -4,45 +4,75 @@ on:
push:
branches:
- "main"
- "develop"
- "release/*"
paths:
- ".github/workflows/flutter_ci.yaml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
- "frontend/rust-lib/**"
- "frontend/appflowy_flutter/**"
- "frontend/resources/**"
pull_request:
branches:
- "main"
- "develop"
- "release/*"
paths:
- ".github/workflows/flutter_ci.yaml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
- "frontend/rust-lib/**"
- "frontend/appflowy_flutter/**"
- "frontend/resources/**"
env:
FLUTTER_VERSION: "3.10.1"
RUST_TOOLCHAIN: "1.70"
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.19.0"
RUST_TOOLCHAIN: "1.75"
CARGO_MAKE_VERSION: "0.36.6"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
prepare-linux:
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
target: x86_64-unknown-linux-gnu
- os: macos-latest
flutter_profile: development-mac-x86_64
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
# the following step is required to avoid running out of space
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout source code
uses: actions/checkout@v4
- name: Flutter build
uses: ./.github/actions/flutter_build
with:
os: ${{ matrix.os }}
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
flutter_profile: ${{ matrix.flutter_profile }}
prepare-windows:
if: github.event.pull_request.draft != true
strategy:
fail-fast: true
matrix:
os: [windows-latest]
include:
- os: windows-latest
flutter_profile: development-windows-x86
target: x86_64-pc-windows-msvc
@@ -50,7 +80,60 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Flutter build
uses: ./.github/actions/flutter_build
with:
os: ${{ matrix.os }}
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
flutter_profile: ${{ matrix.flutter_profile }}
prepare-macos:
if: github.event.pull_request.draft != true
strategy:
fail-fast: true
matrix:
os: [macos-latest]
include:
- os: macos-latest
flutter_profile: development-mac-x86_64
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Flutter build
uses: ./.github/actions/flutter_build
with:
os: ${{ matrix.os }}
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
flutter_profile: ${{ matrix.flutter_profile }}
unit_test:
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
id: rust_toolchain
@@ -74,27 +157,21 @@ jobs:
prefix-key: ${{ matrix.os }}
workspaces: |
frontend/rust-lib
cache-all-crates: true
- uses: davidB/rust-cargo-make@v1
- uses: taiki-e/install-action@v2
with:
version: '0.36.6'
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }}, duckscript_cli
- name: Install prerequisites
working-directory: frontend
run: |
cargo install --force duckscript_cli
if [ "$RUNNER_OS" == "Linux" ]; then
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
sudo apt-get install keybinder-3.0
elif [ "$RUNNER_OS" == "Windows" ]; then
vcpkg integrate install
elif [ "$RUNNER_OS" == "macOS" ]; then
echo 'do nothing'
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev
fi
cargo make appflowy-flutter-deps-tools
shell: bash
- name: Enable Flutter Desktop
@@ -109,32 +186,186 @@ jobs:
fi
shell: bash
- name: Build AppFlowy
working-directory: frontend
run: |
cargo make --profile ${{ matrix.flutter_profile }} appflowy-dev
- uses: actions/download-artifact@v4
with:
name: ${{ github.run_id }}-${{ matrix.os }}
- name: Flutter Analyzer
working-directory: frontend/appflowy_flutter
run: |
flutter analyze .
- name: Uncompress appflowy_flutter
run: tar -xf appflowy_flutter.tar.gz
- name: Run flutter pub get
working-directory: frontend
run: cargo make pub_get
- name: Run Flutter unit tests
working-directory: frontend
run: |
cargo make dart_unit_test
if [ "$RUNNER_OS" == "macOS" ]; then
cargo make dart_unit_test
elif [ "$RUNNER_OS" == "Linux" ]; then
cargo make dart_unit_test_no_build
elif [ "$RUNNER_OS" == "Windows" ]; then
cargo make dart_unit_test_no_build
fi
shell: bash
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v1.0.36
cloud_integration_test:
needs: [prepare-linux]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- name: Checkout appflowy cloud code
uses: actions/checkout@v4
with:
action: codecov/codecov-action@v3
with: |
name: appflowy
flags: appflowy_flutter_unit_test
fail_ci_if_error: true
verbose: true
os: ${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}
attempt_limit: 20
attempt_delay: 10000
repository: AppFlowy-IO/AppFlowy-Cloud
path: AppFlowy-Cloud
- name: Prepare appflowy cloud env
working-directory: AppFlowy-Cloud
run: |
# log level
cp deploy.env .env
sed -i 's|RUST_LOG=.*|RUST_LOG=trace|' .env
sed -i 's/GOTRUE_EXTERNAL_GOOGLE_ENABLED=.*/GOTRUE_EXTERNAL_GOOGLE_ENABLED=true/' .env
sed -i 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost|' .env
- name: Run Docker-Compose
working-directory: AppFlowy-Cloud
run: |
docker compose down -v --remove-orphans
docker compose pull
docker compose up -d
sleep 10
- name: Checkout source code
uses: actions/checkout@v4
- name: Install flutter
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- uses: taiki-e/install-action@v2
with:
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }}
- name: Install prerequisites
working-directory: frontend
run: |
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev
shell: bash
- name: Enable Flutter Desktop
run: |
flutter config --enable-linux-desktop
shell: bash
- uses: actions/download-artifact@v4
with:
name: ${{ github.run_id }}-${{ matrix.os }}
- name: Uncompressed appflowy_flutter
run: |
tar -xf appflowy_flutter.tar.gz
ls -al
- name: Run flutter pub get
working-directory: frontend
run: cargo make pub_get
- name: Run Flutter integration tests
working-directory: frontend/appflowy_flutter
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt-get install network-manager
docker ps -a
flutter test integration_test/cloud/cloud_runner.dart -d Linux --coverage
shell: bash
# split the integration tests into different machines to minimize the time
integration_test_1:
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
target: 'x86_64-unknown-linux-gnu'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Flutter Integration Test 1
uses: ./.github/actions/flutter_integration_test
with:
test_path: integration_test/desktop_runner_1.dart
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
integration_test_2:
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
target: 'x86_64-unknown-linux-gnu'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Flutter Integration Test 2
uses: ./.github/actions/flutter_integration_test
with:
test_path: integration_test/desktop_runner_2.dart
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
integration_test_3:
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
target: 'x86_64-unknown-linux-gnu'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Flutter Integration Test 3
uses: ./.github/actions/flutter_integration_test
with:
test_path: integration_test/desktop_runner_3.dart
flutter_version: ${{ env.FLUTTER_VERSION }}
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
rust_target: ${{ matrix.target }}
-141
View File
@@ -1,141 +0,0 @@
name: integration test
on:
push:
branches:
- "main"
- "release/*"
paths:
- ".github/workflows/integration_test.yml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
pull_request:
branches:
- "main"
- "release/*"
paths:
- ".github/workflows/integration_test.yml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
env:
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.10.1"
RUST_TOOLCHAIN: "1.70"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
target: x86_64-unknown-linux-gnu
- os: windows-latest
flutter_profile: development-windows-x86
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: ${{ matrix.target }}
override: true
profile: minimal
- name: Install flutter
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.os }}
workspaces: |
frontend/rust-lib
cache-all-crates: true
- uses: davidB/rust-cargo-make@v1
with:
version: '0.36.6'
- name: Install prerequisites
working-directory: frontend
run: |
cargo install --force duckscript_cli
if [ "$RUNNER_OS" == "Linux" ]; then
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
sudo apt-get install keybinder-3.0
elif [ "$RUNNER_OS" == "Windows" ]; then
vcpkg integrate install
elif [ "$RUNNER_OS" == "macOS" ]; then
echo 'do nothing'
fi
cargo make appflowy-flutter-deps-tools
shell: bash
- name: Enable Flutter Desktop
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
flutter config --enable-linux-desktop
elif [ "$RUNNER_OS" == "macOS" ]; then
flutter config --enable-macos-desktop
elif [ "$RUNNER_OS" == "Windows" ]; then
git config --system core.longpaths true
flutter config --enable-windows-desktop
fi
shell: bash
- name: Build AppFlowy
working-directory: frontend
run: |
cargo make --profile ${{ matrix.flutter_profile }} appflowy-dev
- name: Run Flutter integration tests
working-directory: frontend/appflowy_flutter
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt-get install network-manager
flutter test integration_test/runner.dart -d Linux --coverage
elif [ "$RUNNER_OS" == "macOS" ]; then
flutter test integration_test/runner.dart -d macOS --coverage
elif [ "$RUNNER_OS" == "Windows" ]; then
flutter test integration_test/runner.dart -d Windows --coverage
fi
shell: bash
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v1.0.36
with:
action: codecov/codecov-action@v3
with: |
name: appflowy
flags: appflowy_flutter_integrateion_test
fail_ci_if_error: true
verbose: true
os: ${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}
attempt_limit: 20
attempt_delay: 10000
+91
View File
@@ -0,0 +1,91 @@
name: iOS CI
on:
push:
branches:
- "main"
paths:
- ".github/workflows/mobile_ci.yaml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
pull_request:
branches:
- "main"
paths:
- ".github/workflows/mobile_ci.yaml"
- "frontend/**"
- "!frontend/appflowy_tauri/**"
env:
FLUTTER_VERSION: "3.19.0"
RUST_TOOLCHAIN: "1.75"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.event.pull_request.draft != true
strategy:
fail-fast: true
matrix:
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: aarch64-apple-ios-sim
override: true
profile: minimal
- name: Install flutter
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.os }}
workspaces: |
frontend/rust-lib
- uses: davidB/rust-cargo-make@v1
with:
version: "0.36.6"
- name: Install prerequisites
working-directory: frontend
run: |
rustup target install aarch64-apple-ios-sim
cargo install --force duckscript_cli
cargo install cargo-lipo
cargo make appflowy-flutter-deps-tools
shell: bash
- name: Build AppFlowy
working-directory: frontend
run: |
cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios
cargo make --profile development-ios-arm64-sim code_generation
- uses: futureware-tech/simulator-action@v3
id: simulator-action
with:
model: 'iPhone 15'
shutdown_after_job: false
- name: Run integration tests
working-directory: frontend/appflowy_flutter
run: flutter test integration_test/runner.dart -d ${{ steps.simulator-action.outputs.udid }}
+75 -51
View File
@@ -6,8 +6,8 @@ on:
- "*"
env:
FLUTTER_VERSION: "3.10.1"
RUST_TOOLCHAIN: "1.70"
FLUTTER_VERSION: "3.19.0"
RUST_TOOLCHAIN: "1.75"
jobs:
create-release:
@@ -18,7 +18,7 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build release notes
run: |
@@ -35,13 +35,15 @@ jobs:
release_name: v${{ github.ref }}
body_path: ${{ env.RELEASE_NOTES_PATH }}
# the package name should be with the format: AppFlowy-<version>-<os>-<arch>
build-for-windows:
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
needs: create-release
env:
WINDOWS_APP_RELEASE_PATH: frontend\appflowy_flutter\product\${{ github.ref_name }}\windows
WINDOWS_ZIP_NAME: AppFlowy_${{ github.ref_name }}_windows-x86_64.zip
WINDOWS_INSTALLER_NAME: AppFlowy_${{ github.ref_name }}_windows-x86_64
WINDOWS_ZIP_NAME: AppFlowy-${{ github.ref_name }}-windows-x86_64.zip
WINDOWS_INSTALLER_NAME: AppFlowy-${{ github.ref_name }}-windows-x86_64
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
@@ -50,14 +52,20 @@ jobs:
- { target: x86_64-pc-windows-msvc, os: windows-2019 }
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Export pub environment variable on Windows
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "PUB_CACHE=$LOCALAPPDATA\\Pub\\Cache" >> $GITHUB_ENV
fi
shell: bash
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
@@ -68,11 +76,6 @@ jobs:
components: rustfmt
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
prefix-key: appflowy-lib-cache
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
- name: Install prerequisites
working-directory: frontend
run: |
@@ -133,8 +136,8 @@ jobs:
needs: create-release
env:
MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/macos/Release
MACOS_X86_ZIP_NAME: AppFlowy_${{ github.ref_name }}_macos-x86_64.zip
MACOS_DMG_NAME: AppFlowy_${{ github.ref_name }}_macos-x86_64
MACOS_X86_ZIP_NAME: AppFlowy-${{ github.ref_name }}-macos-x86_64.zip
MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-x86_64
strategy:
fail-fast: false
matrix:
@@ -142,14 +145,13 @@ jobs:
- { target: x86_64-apple-darwin, os: macos-11, extra-build-args: "" }
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
@@ -160,11 +162,6 @@ jobs:
components: rustfmt
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
prefix-key: appflowy-lib-cache
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
- name: Install prerequisites
working-directory: frontend
run: |
@@ -235,8 +232,8 @@ jobs:
needs: create-release
env:
MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/macos/Release
MACOS_AARCH64_ZIP_NAME: AppFlowy_${{ github.ref_name }}_macos-universal.zip
MACOS_DMG_NAME: AppFlowy_${{ github.ref_name }}_macos-universal
MACOS_AARCH64_ZIP_NAME: AppFlowy-${{ github.ref_name }}-macos-universal.zip
MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-universal
strategy:
fail-fast: false
matrix:
@@ -248,14 +245,13 @@ jobs:
}
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
@@ -264,11 +260,6 @@ jobs:
targets: ${{ matrix.job.targets }}
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
prefix-key: appflowy-lib-cache
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
- name: Install prerequisites
working-directory: frontend
run: |
@@ -279,7 +270,7 @@ jobs:
working-directory: frontend
run: |
flutter config --enable-macos-desktop
sh scripts/flutter_release_build/build_universal_package_for_macos.sh
sh scripts/flutter_release_build/build_universal_package_for_macos.sh ${{ github.ref_name }}
- name: Codesign AppFlowy
run: |
@@ -339,9 +330,13 @@ jobs:
needs: create-release
env:
LINUX_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/linux/Release
LINUX_ZIP_NAME: AppFlowy_${{ matrix.job.target }}_${{ matrix.job.os }}.tar.gz
LINUX_PACKAGE_NAME: AppFlowy_${{ github.ref_name }}_${{ matrix.job.os }}.deb
# PKG_CONFIG_SYSROOT_DIR: /
LINUX_ZIP_NAME: AppFlowy-${{ matrix.job.target }}-x86_64.tar.gz
LINUX_PACKAGE_DEB_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.deb
LINUX_PACKAGE_RPM_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.rpm
LINUX_PACKAGE_TMP_RPM_NAME: AppFlowy-${{ github.ref_name }}-2.x86_64.rpm
LINUX_PACKAGE_TMP_APPIMAGE_NAME: AppFlowy-${{ github.ref_name }}-x86_64.AppImage
LINUX_PACKAGE_APPIMAGE_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.AppImage
strategy:
fail-fast: false
matrix:
@@ -355,14 +350,13 @@ jobs:
}
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
@@ -373,18 +367,14 @@ jobs:
components: rustfmt
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
prefix-key: appflowy-lib-cache
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
- name: Install prerequisites
working-directory: frontend
run: |
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo apt-get update
sudo apt-get install -y build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
sudo apt-get install keybinder-3.0
sudo apt-get install keybinder-3.0 libnotify-dev
sudo apt-get -y install alien
source $HOME/.cargo/env
cargo install --force cargo-make
cargo install --force duckscript_cli
@@ -409,8 +399,21 @@ jobs:
- name: Build Linux package (.deb)
working-directory: frontend
run: |
sh scripts/linux_distribution/deb/build_deb.sh appflowy_flutter/product/${{ github.ref_name }}/linux/Release ${{ github.ref_name }} ${{ env.LINUX_PACKAGE_NAME }}
sh scripts/linux_distribution/deb/build_deb.sh appflowy_flutter/product/${{ github.ref_name }}/linux/Release ${{ github.ref_name }} ${{ env.LINUX_PACKAGE_DEB_NAME }}
- name: Build Linux package (.rpm)
working-directory: ${{ env.LINUX_APP_RELEASE_PATH }}
run: |
sudo alien -r ${{ env.LINUX_PACKAGE_DEB_NAME }}
cp -r ${{ env.LINUX_PACKAGE_TMP_RPM_NAME }} ${{ env.LINUX_PACKAGE_RPM_NAME }}
- name: Build Linux package (.AppImage)
working-directory: frontend
continue-on-error: true
run: |
sh scripts/linux_distribution/appimage/build_appimage.sh ${{ github.ref_name }}
cp -r ${{ env.LINUX_PACKAGE_TMP_APPIMAGE_NAME }} ${{ env.LINUX_PACKAGE_APPIMAGE_NAME }}
- name: Upload Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
@@ -423,34 +426,55 @@ jobs:
asset_content_type: application/octet-stream
- name: Upload Debian package
id: upload-release-asset-install-package
id: upload-release-asset-install-package-deb
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_NAME }}
asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_DEB_NAME }}
asset_name: ${{ env.LINUX_PACKAGE_DEB_NAME }}
asset_content_type: application/octet-stream
asset_name: ${{ env.LINUX_PACKAGE_NAME }}
- name: Upload RPM package
id: upload-release-asset-install-package-rpm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_RPM_NAME }}
asset_name: ${{ env.LINUX_PACKAGE_RPM_NAME }}
asset_content_type: application/octet-stream
- name: Upload AppImage package
id: upload-release-asset-install-package-appimage
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_APPIMAGE_NAME }}
asset_name: ${{ env.LINUX_PACKAGE_APPIMAGE_NAME }}
asset_content_type: application/octet-stream
build-for-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./frontend/scripts/docker-buildfiles/Dockerfile
+50 -22
View File
@@ -8,7 +8,6 @@ on:
- "release/*"
paths:
- "frontend/rust-lib/**"
- "shared-lib/**"
pull_request:
branches:
@@ -17,19 +16,33 @@ on:
- "release/*"
paths:
- "frontend/rust-lib/**"
- "shared-lib/**"
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: "1.70"
RUST_TOOLCHAIN: "1.75"
jobs:
test-on-ubuntu:
environment: SUPABASE_CI
runs-on: ubuntu-latest
steps:
# - name: Maximize build space
# uses: easimon/maximize-build-space@master
# with:
# root-reserve-mb: 2048
# swap-size-mb: 1024
# remove-dotnet: 'true'
#
# # the following step is required to avoid running out of space
# - name: Maximize build space
# run: |
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /opt/ghc
# sudo rm -rf "/usr/local/share/boost"
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# sudo docker image prune --all --force
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Rust toolchain
id: rust_toolchain
@@ -48,34 +61,49 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
prefix-key: 'ubuntu-latest'
prefix-key: "ubuntu-latest"
workspaces: |
frontend/rust-lib
- name: Create .env file in flowy-server
working-directory: frontend/rust-lib/flowy-server
run: |
touch .env.ci
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
- name: Checkout appflowy cloud code
uses: actions/checkout@v4
with:
repository: AppFlowy-IO/AppFlowy-Cloud
path: AppFlowy-Cloud
- name: Create .env file in flowy-test
working-directory: frontend/rust-lib/flowy-test
- name: Prepare appflowy cloud env
working-directory: AppFlowy-Cloud
run: |
touch .env.ci
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
# log level
cp deploy.env .env
sed -i 's|RUST_LOG=.*|RUST_LOG=trace|' .env
sed -i 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost|' .env
- name: Run Docker-Compose
working-directory: AppFlowy-Cloud
run: |
docker pull appflowyinc/appflowy_cloud:latest
docker compose up -d
- name: Run rust-lib tests
working-directory: frontend/rust-lib
run: RUST_LOG=info RUST_BACKTRACE=1 cargo test --no-default-features --features="rev-sqlite"
env:
RUST_LOG: info
RUST_BACKTRACE: 1
af_cloud_test_base_url: http://localhost
af_cloud_test_ws_url: ws://localhost/ws/v1
af_cloud_test_gotrue_url: http://localhost/gotrue
run: cargo test --no-default-features --features="rev-sqlite,dart" -- --nocapture
- name: rustfmt rust-lib
run: cargo fmt --all -- --check
working-directory: frontend/rust-lib/
- name: clippy rust-lib
run: cargo clippy --all
working-directory: frontend/rust-lib
run: cargo clippy --all-targets -- -D warnings
working-directory: frontend/rust-lib
- name: Clean up Docker images
run: |
docker image prune -af
docker volume prune -f
+3 -4
View File
@@ -7,19 +7,18 @@ on:
- "release/*"
paths:
- "frontend/rust-lib/**"
- "shared-lib/**"
env:
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.10.1"
RUST_TOOLCHAIN: "1.70"
FLUTTER_VERSION: "3.19.0"
RUST_TOOLCHAIN: "1.75"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Rust toolchain
id: rust_toolchain
+43 -40
View File
@@ -5,11 +5,12 @@ on:
- ".github/workflows/tauri_ci.yaml"
- "frontend/rust-lib/**"
- "frontend/appflowy_tauri/**"
- "frontend/resources/**"
env:
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.5.0"
RUST_TOOLCHAIN: "1.70"
RUST_TOOLCHAIN: "1.75"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -21,36 +22,36 @@ jobs:
strategy:
fail-fast: false
matrix:
# platform: [macos-latest, ubuntu-latest, windows-latest]
platform: [ubuntu-latest]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
env:
CI: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Maximize build space (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo docker image prune --all --force
sudo rm -rf /opt/hostedtoolcache/codeQL
sudo rm -rf ${GITHUB_WORKSPACE}/.git
sudo rm -rf $ANDROID_HOME/ndk
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache Rust Dependencies
uses: Swatinem/rust-cache@v2
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
key: rust-dependencies-${{ runner.os }}
workspaces: |
frontend/rust-lib
frontend/appflowy_tauri/src-tauri
- name: Cache Node.js dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ runner.os }}
- name: Cache node_modules
uses: actions/cache@v2
with:
path: frontend/appflowy_tauri/node_modules
key: node-modules-${{ runner.os }}
version: ${{ env.PNPM_VERSION }}
- name: Install Rust toolchain
id: rust_toolchain
@@ -60,15 +61,23 @@ jobs:
override: true
profile: minimal
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./frontend/appflowy_tauri/src-tauri -> target"
- name: Node_modules cache
uses: actions/cache@v2
with:
path: frontend/appflowy_tauri/node_modules
key: node-modules-${{ runner.os }}
- name: install dependencies (windows only)
if: matrix.platform == 'windows-latest'
working-directory: frontend
run: |
cargo install --force cargo-make
cargo install --force duckscript_cli
vcpkg integrate install
cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
@@ -76,35 +85,29 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (macOS only)
if: matrix.platform == 'macos-latest'
- name: install cargo-make
working-directory: frontend
run: |
cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: Build
- name: install frontend dependencies
working-directory: frontend/appflowy_tauri
run: |
mkdir dist
pnpm install
cargo make --cwd .. tauri_build
- name: frontend tests and linting
working-directory: frontend/appflowy_tauri
run: |
pnpm test
pnpm test:errors
- name: Check for uncommitted changes
run: |
diff_files=$(git status --porcelain)
if [ -n "$diff_files" ]; then
echo "There are uncommitted changes in the working tree. Please commit them before pushing."
exit 1
fi
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tauriScript: pnpm tauri
projectPath: frontend/appflowy_tauri
+153
View File
@@ -0,0 +1,153 @@
name: Publish Tauri Release
on:
workflow_dispatch:
inputs:
branch:
description: 'The branch to release'
required: true
default: 'main'
version:
description: 'The version to release'
required: true
default: '0.0.0'
env:
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.5.0"
RUST_TOOLCHAIN: "1.75"
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: windows-latest
args: "--verbose"
target: "windows-x86_64"
- platform: macos-latest
args: "--target x86_64-apple-darwin"
target: "macos-x86_64"
- platform: ubuntu-latest
args: "--target x86_64-unknown-linux-gnu"
target: "linux-x86_64"
runs-on: ${{ matrix.settings.platform }}
env:
CI: true
PACKAGE_PREFIX: AppFlowy_Tauri-${{ github.event.inputs.version }}-${{ matrix.settings.target }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Maximize build space (ubuntu only)
if: matrix.settings.platform == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo docker image prune --all --force
sudo rm -rf /opt/hostedtoolcache/codeQL
sudo rm -rf ${GITHUB_WORKSPACE}/.git
sudo rm -rf $ANDROID_HOME/ndk
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
profile: minimal
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./frontend/appflowy_tauri/src-tauri -> target"
- name: install dependencies (windows only)
if: matrix.settings.platform == 'windows-latest'
working-directory: frontend
run: |
cargo install --force duckscript_cli
vcpkg integrate install
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-latest'
working-directory: frontend
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install cargo-make
working-directory: frontend
run: |
cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools
- name: install frontend dependencies
working-directory: frontend/appflowy_tauri
run: |
mkdir dist
pnpm install
pnpm exec node scripts/update_version.cjs ${{ github.event.inputs.version }}
cargo make --cwd .. tauri_build
- uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.MACOS_TEAM_ID }}
APPLE_ID: ${{ secrets.MACOS_NOTARY_USER }}
APPLE_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }}
APPLE_PASSWORD: ${{ secrets.MACOS_NOTARY_PWD }}
CI: true
with:
args: ${{ matrix.settings.args }}
appVersion: ${{ github.event.inputs.version }}
tauriScript: pnpm tauri
projectPath: frontend/appflowy_tauri
- name: Upload EXE package(windows only)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'windows-latest'
with:
name: ${{ env.PACKAGE_PREFIX }}.exe
path: frontend/appflowy_tauri/src-tauri/target/release/bundle/nsis/AppFlowy_${{ github.event.inputs.version }}_x64-setup.exe
- name: Upload DMG package(macos only)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'macos-latest'
with:
name: ${{ env.PACKAGE_PREFIX }}.dmg
path: frontend/appflowy_tauri/src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/AppFlowy_${{ github.event.inputs.version }}_x64.dmg
- name: Upload Deb package(ubuntu only)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'ubuntu-latest'
with:
name: ${{ env.PACKAGE_PREFIX }}.deb
path: frontend/appflowy_tauri/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/app-flowy_${{ github.event.inputs.version }}_amd64.deb
- name: Upload AppImage package(ubuntu only)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'ubuntu-latest'
with:
name: ${{ env.PACKAGE_PREFIX }}.AppImage
path: frontend/appflowy_tauri/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/app-flowy_${{ github.event.inputs.version }}_amd64.AppImage
+84
View File
@@ -0,0 +1,84 @@
name: WEB-CI
on:
pull_request:
branches:
- "main"
paths:
- ".github/workflows/web_ci.yaml"
- "frontend/rust-lib/**"
- "frontend/appflowy_web/**"
env:
CARGO_TERM_COLOR: always
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.5.0"
RUST_TOOLCHAIN: "1.75"
CARGO_MAKE_VERSION: "0.36.6"
jobs:
web-build:
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache Rust Dependencies
uses: Swatinem/rust-cache@v2
with:
key: rust-dependencies-${{ runner.os }}
workspaces: |
frontend/rust-lib
frontend/appflowy_web/appflowy_wasm
# TODO: Can combine caching deps and node_modules in one
# See Glob patterns: https://github.com/actions/toolkit/tree/main/packages/glob
- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}
- name: Cache node_modules
uses: actions/cache@v4
with:
path: frontend/appflowy_web/node_modules
key: node-modules-${{ runner.os }}
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
profile: minimal
- name: Install wasm-pack
run: cargo install wasm-pack
- uses: taiki-e/install-action@v2
with:
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }}
- name: install dependencies
if: matrix.platform == 'ubuntu-latest'
working-directory: frontend
run: |
sudo apt-get update
npm install -g pnpm@${{ env.PNPM_VERSION }}
cargo make install_web_protobuf
- name: Build
working-directory: frontend/appflowy_web
run: |
pnpm install
pnpm run build_release_wasm
+3 -6
View File
@@ -21,11 +21,8 @@ node_modules
**/resources/proto
!frontend/.vscode/settings.json
!frontend/.vscode/tasks.json
!frontend/.vscode/launch.json
!frontend/.vscode/extensions.json
!frontend/.vscode/*.code-snippets
# ignore settings.json
frontend/.vscode/settings.json
# Commit the highest level pubspec.lock, but ignore the others
pubspec.lock
@@ -38,7 +35,7 @@ pubspec.lock
**/AppFlowy-Collab/
# ignore the deb filegit
# ignore generated assets
frontend/package
frontend/*.deb
-23
View File
@@ -1,23 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ProtoBuf_Gen" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --manifest-path ${flowy_tool} -- pb-gen --rust_sources=${rust_lib},${shared_lib} --derive_meta=${derive_meta} --flutter_package_lib=${flutter_package_lib}" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/frontend" />
<option name="channel" value="DEFAULT" />
<option name="allFeatures" value="false" />
<option name="emulateTerminal" value="false" />
<option name="backtrace" value="SHORT" />
<envs>
<env name="flowy_tool" value="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/scripts/flowy-tool/Cargo.toml" />
<env name="rust_lib" value="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/" />
<env name="shared_lib" value="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/../shared_lib" />
<env name="flutter_lib" value="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/packages" />
<env name="derive_meta" value="${shared_lib}/flowy-derive/src/derive_cache/derive_cache.rs" />
<env name="flutter_package_lib" value="${flutter_lib}/flowy_sdk/lib" />
</envs>
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
-18
View File
@@ -1,18 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run backend" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --package backend --bin backend" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/backend" />
<option name="channel" value="DEFAULT" />
<option name="allFeatures" value="false" />
<option name="emulateTerminal" value="false" />
<option name="backtrace" value="SHORT" />
<envs>
<env name="APP_ENVIRONMENT" value="production" />
</envs>
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
-16
View File
@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dart-event" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --manifest-path $PROJECT_DIR$/scripts/flowy-tool/Cargo.toml -- dart-event --rust_source=$PROJECT_DIR$/rust-lib/ --output=$PROJECT_DIR$/appflowy_flutter/packages/flowy_sdk/lib/dispatch/dart_event.dart" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<option name="channel" value="DEFAULT" />
<option name="allFeatures" value="false" />
<option name="emulateTerminal" value="false" />
<option name="backtrace" value="SHORT" />
<envs />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
+209
View File
@@ -1,4 +1,213 @@
# Release Notes
## Version 0.5.2 - 03/13/2024
### Bug Fixes
- Import csv file.
## Version 0.5.1 - 03/11/2024
### New Features
- Introduced support for performing generic calculations on databases.
- Implemented functionality for easily duplicating calendar events.
- Added the ability to duplicate fields with cell data, facilitating smoother data management.
- Now supports customizing font styles and colors prior to typing.
- Enhanced the checklist user experience with the integration of keyboard shortcuts.
- Improved the dark mode experience on mobile devices.
### Bug Fixes
- Fixed an issue with some pages failing to sync properly.
- Fixed an issue where links without the http(s) scheme could not be opened, ensuring consistent link functionality.
- Fixed an issue that prevented numbers from being inserted before heading blocks.
- Fixed the inline page reference update mechanism to accurately reflect workspace changes.
- Fixed an issue that made it difficult to resize images in certain cases.
- Enhanced image loading reliability by clearing the image cache when images fail to load.
- Resolved a problem preventing the launching of URLs on some Linux distributions.
## Version 0.5.0 - 02/26/2024
### New Features
- Added support for scaling text on mobile platforms for better readability.
- Introduced a toggle for favorites directly from the documents' top bar.
- Optimized the image upload process and added error messaging for failed uploads.
- Implemented depth control for outline block components.
- New checklist task creation is now more intuitive, with prompts appearing on hover over list items in the row detail page.
- Enhanced sorting capabilities, allowing reordering and addition of multiple sorts.
- Expanded sorting and filtering options to include more field types like checklist, creation time, and modification time.
- Added support for field calculations within databases.
### Bug Fixes
- Fixed an issue where inserting an image from Unsplash in local mode was not possible.
- Fixed undo/redo functionality in lists.
- Fixed data loss issues when converting between block types.
- Fixed a bug where newly created rows were not being automatically sorted.
- Fixed issues related to deleting a sorting field or sort not removing existing sorts properly.
### Notes
- Windows 7, Windows 8, and iOS 11 are not yet supported due to the upgrade to Flutter 3.19.0.
## Version 0.4.9 - 02/17/2024
### Bug Fixes
- Resolved the issue that caused users to be redirected to the Sign In page
## Version 0.4.8 - 02/13/2024
### Bug Fixes
- Fixed a possible error when loading workspaces
## Version 0.4.6 - 02/03/2024
### Bug Fixes
- Fixed refresh token bug
## Version 0.4.5 - 02/01/2024
### Bug Fixes
- Fixed WebSocket connection issue
## Version 0.4.4 - 01/31/2024
### New Features
- Added functionality for uploading images to cloud storage.
- Enabled anonymous sign-in option for mobile platform users.
- Introduced the ability to customize cloud settings directly from the startup page.
- Added support for inserting reminders on the mobile platform.
- Overhauled the user interface on mobile devices, including improvements to the action bottom sheet, editor toolbar, database details page, and app bar.
- Implemented a shortcut (F2 key) to rename the current view.
### Bug Fixes
- Fixed an issue where the font family was not displaying correctly on the mobile platform.
- Resolved a problem with the mobile row detail title not updating correctly.
- Fixed issues related to deleting images and refactored the image actions menu for better usability.
- Fixed other known issues.
# Release Notes
## Version 0.4.3 - 01/16/2024
### Bug Fixes
- Fixed file name too long issue
## Version 0.4.2 - 01/15/2024
AppFlowy for Android is available to download on GitHub.
If you’ve been using our desktop app, it’s important to read [this guide](https://docs.appflowy.io/docs/guides/sync-desktop-and-mobile) before logging into the mobile app.
### New Features
- Enhanced RTL (Right-to-Left) support for mobile platforms.
- Optimized selection gesture system on mobile.
- Optimized the mobile toolbar menu.
- Improved reference menu (‘@’ menu).
- Updated privacy policy.
- Improved the data import process for AppFlowy by implementing a progress indicator and compressing the data to enhance efficiency.
- Enhanced the utilization of local disk space to optimize storage consumption.
### Bug Fixes
- Fixed sign-in cancellation issue on mobile.
- Resolved keyboard close bug on Android.
## Version 0.4.1 - 01/03/2024
### Bug fixes
- Fix import AppFlowy data folder
## Version 0.4.0 - 12/30/2023
1. Added capability to import data from an AppFlowy data folder. For detailed information, please see [AppFlowy Data Storage Documentation](https://docs.appflowy.io/docs/appflowy/product/data-storage).
2. Enhanced user interface and fixed various bugs.
3. Improved the efficiency of data synchronization in AppFlowy Cloud
## Version 0.3.9.1 - 12/07/2023
### Bug fixes
- Fix potential blank pages that may occur in an empty document
## Version 0.3.9 - 12/07/2023
### New Features
- Support inserting a new field to the left or right of an existing one
### Bug fixes
- Fix some emojis are shown in black/white
- Fix unable to rename a subpage of subpage
## Version 0.3.8 - 11/13/2023
### New Features
- Support hiding any stack in a board
- Support customizing page icons in menu
- Display visual hint when card contains notes
- Quick action for adding new stack to a board
- Support more ways of inserting page references in documents
- Shift + click on a checkbox to power toggle its children
### Bug fixes
- Improved color of the "Share"-button text
- Text overflow issue in Calendar properties
- Default font (Roboto) added to application
- Placeholder added for the editor inside a Card
- Toggle notifications in settings have been fixed
- Dialog for linking board/grid/calendar opens in correct position
- Quick add Card in Board at top, correctly adds a new Card at the top
## Version 0.3.7 - 10/30/2023
### New Features
- Support showing checklist items inline in row page.
- Support inserting date from slash menu.
- Support renaming a stack directly by clicking on the stack name.
- Show the detailed reminder content in the notification center.
- Save card order in Board view.
- Allow to hide the ungrouped stack.
- Segmented the checklist progress bar.
### Bug fixes
- Optimize side panel animation.
- Fix calendar with hidden date or title doesn't show options correctly.
- Fix the horizontal scroll bar disappears in Grid view.
- Improve setting tab UI in Grid view.
- Improve theme of the code block.
- Fix some UI issues.
## Version 0.3.6 - 10/16/2023
### New Features
- Support setting Markdown styles through keyboard shortcuts.
- Added Ukrainian language.
- Support auto-hiding sidebar feature, ensuring a streamlined view even when resizing to a smaller window.
- Support toggling the notifitcation on/off.
- Added Lemonade theme.
### Bug fixes
- Improve Vietnamese translations.
- Improve reminder feature.
- Fix some UI issues.
## Version 0.3.5 - 10/09/2023
### New Features
- Added support for browsing and inserting images from Unsplash.
- Revamp and unify the emoji picker throughout AppFlowy.
### Bug fixes
- Improve layout of the settings page.
- Improve design of the restore page banner.
- Improve UX of the reminders.
- Other UI fixes.
## Version 0.3.4 - 10/02/2023
### New Features
- Added support for creating a reminder.
- Added support for finding and replacing in the document page.
- Added support for showing the hidden fields in row detail page.
- Adjust the toolbar style in RTL mode.
### Bug fixes
- Improve snackbar UI design.
- Improve dandelion theme.
- Improve id-ID and pl-PL language translations.
## Version 0.3.3 - 09/24/2023
### New Features
- Added an end date field to the time cell in the database.
- Added Support for customizing the font family from GoogleFonts in the editor.
- Set the uploaded image to cover by default.
- Added Support for resetting the user icon on settings page
- Add Urdu language translations.
### Bug fixes
- Default colors for the blocks except for the callout were not transparent.
- Option/Alt + click to add a block above didn't work on the first line.
- Unable to paste HTML content containing `<mark>` tag.
- Unable to select the text from anywhere in the line.
- The selection in the editor didn't clear when editing the inline database.
- Added a bottom border to new property column in the database.
- Set minimum width of 50px for grid fields.
## Version 0.3.2 - 09/18/2023
+3 -3
View File
@@ -18,7 +18,7 @@ You are in charge of your data and customizations.
</p>
<p align="center">
<a href="http://www.appflowy.io"><b>Website</b></a> •
<a href="https://www.appflowy.io"><b>Website</b></a> •
<a href="https://discord.gg/9Q2xaN37tV"><b>Discord</b></a> •
<a href="https://twitter.com/appflowy"><b>Twitter</b></a>
</p>
@@ -47,7 +47,7 @@ You are in charge of your data and customizations.
## Getting Started with development
Please view the [documentation](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy) for OS specific development instructions
Please view the [documentation](https://docs.appflowy.io/docs/documentation/appflowy/from-source) for OS specific development instructions
## Roadmap
@@ -73,7 +73,7 @@ Proudly wear your T-shirt and show it to us by tagging [@appflowy](https://twitt
[![translation badge](https://inlang.com/badge?url=github.com/AppFlowy-IO/AppFlowy)](https://inlang.com/editor/github.com/AppFlowy-IO/AppFlowy?ref=badge)
To add translations, you can manually edit the JSON translation files in `/frontend/appflowy_flutter/assets/translations`, use the [inlang online editor](https://inlang.com/editor/github.com/AppFlowy-IO/AppFlowy), or run `npx inlang machine translate` to add missing translations.
To add translations, you can manually edit the JSON translation files in `/frontend/resources/translations`, use the [inlang online editor](https://inlang.com/editor/github.com/AppFlowy-IO/AppFlowy), or run `npx inlang machine translate` to add missing translations.
## Join the community to build AppFlowy together
+60 -12
View File
@@ -4,6 +4,21 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// This task only builds the Dart code of AppFlowy.
// It supports both the desktop and mobile version.
"name": "AF: Build Dart Only",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"env": {
"RUST_LOG": "debug",
"RUST_BACKTRACE": "1"
},
// uncomment the following line to testing performance.
// "flutterMode": "profile",
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
// This task builds the Rust and Dart code of AppFlowy.
"name": "AF-desktop: Build All",
@@ -13,18 +28,7 @@
"preLaunchTask": "AF: Build Appflowy Core",
"env": {
"RUST_LOG": "trace",
"RUST_BACKTRACE": 1
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
// This task only builds the Dart code of AppFlowy.
"name": "AF-desktop: Build Dart Only",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"env": {
"RUST_LOG": "debug",
"RUST_BACKTRACE": "1"
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
@@ -43,6 +47,17 @@
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-iOS: Build All",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"preLaunchTask": "AF: Build Appflowy Core For iOS",
"env": {
"RUST_LOG": "trace"
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-iOS: Clean + Rebuild All",
"request": "launch",
@@ -54,6 +69,17 @@
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-iOS-Simulator: Build All",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"preLaunchTask": "AF: Build Appflowy Core For iOS Simulator",
"env": {
"RUST_LOG": "trace"
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-iOS-Simulator: Clean + Rebuild All",
"request": "launch",
@@ -65,6 +91,28 @@
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-Android: Build All",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"preLaunchTask": "AF: Build Appflowy Core For Android",
"env": {
"RUST_LOG": "trace"
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-Android: Clean + Rebuild All",
"request": "launch",
"program": "./lib/main.dart",
"type": "dart",
"preLaunchTask": "AF: Clean + Rebuild All (Android)",
"env": {
"RUST_LOG": "trace"
},
"cwd": "${workspaceRoot}/appflowy_flutter"
},
{
"name": "AF-desktop: Debug Rust",
"request": "attach",
-36
View File
@@ -1,36 +0,0 @@
{
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [80],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false,
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"svgviewer.enableautopreview": true,
"svgviewer.previewcolumn": "Active",
"svgviewer.showzoominout": true,
"editor.wordWrapColumn": 80,
"editor.minimap.maxColumn": 140,
"editor.wordWrap": "wordWrapColumn",
"dart.lineLength": 80,
"typescript.validate.enable": true,
"javascript.validate.enable": true,
"files.associations": {
"*.log.*": "log"
},
"editor.formatOnSave": true,
"files.eol": "\n",
}
+59 -47
View File
@@ -18,7 +18,6 @@
"AF: Flutter Clean",
"AF: Build Appflowy Core",
"AF: Flutter Pub Get",
"AF: Flutter Package Get",
"AF: Generate Language Files",
"AF: Generate Freezed Files",
"AF: Generate Svg Files"
@@ -37,7 +36,6 @@
"AF: Flutter Clean",
"AF: Build Appflowy Core For iOS",
"AF: Flutter Pub Get",
"AF: Flutter Package Get",
"AF: Generate Language Files",
"AF: Generate Freezed Files",
"AF: Generate Svg Files"
@@ -56,7 +54,6 @@
"AF: Flutter Clean",
"AF: Build Appflowy Core For iOS Simulator",
"AF: Flutter Pub Get",
"AF: Flutter Package Get",
"AF: Generate Language Files",
"AF: Generate Freezed Files",
"AF: Generate Svg Files"
@@ -66,6 +63,41 @@
"panel": "new"
}
},
{
"label": "AF: Clean + Rebuild All (Android)",
"type": "shell",
"dependsOrder": "sequence",
"dependsOn": [
"AF: Dart Clean",
"AF: Flutter Clean",
"AF: Build Appflowy Core For Android",
"AF: Flutter Pub Get",
"AF: Generate Language Files",
"AF: Generate Freezed Files",
"AF: Generate Svg Files"
],
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "AF: Build Appflowy Core",
"type": "shell",
"windows": {
"command": "cargo make --profile development-windows-x86 appflowy-core-dev"
},
"linux": {
"command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev"
},
"osx": {
"command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev"
},
"group": "build",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "AF: Build Appflowy Core For iOS",
"type": "shell",
@@ -85,17 +117,9 @@
}
},
{
"label": "AF: Build Appflowy Core",
"label": "AF: Build Appflowy Core For Android",
"type": "shell",
"windows": {
"command": "cargo make --profile development-windows-x86 appflowy-core-dev"
},
"linux": {
"command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev"
},
"osx": {
"command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev"
},
"command": "cargo make --profile development-android appflowy-core-dev-android",
"group": "build",
"options": {
"cwd": "${workspaceFolder}"
@@ -108,7 +132,6 @@
"dependsOn": [
"AF: Flutter Clean",
"AF: Flutter Pub Get",
"AF: Flutter Package Get",
"AF: Generate Language Files",
"AF: Generate Freezed Files",
"AF: Generate Svg Files"
@@ -122,6 +145,15 @@
"panel": "new"
}
},
{
"label": "AF: Dart Clean",
"type": "shell",
"command": "cargo make flutter_clean",
"group": "build",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "AF: Flutter Clean",
"type": "shell",
@@ -138,14 +170,6 @@
"cwd": "${workspaceFolder}/appflowy_flutter"
}
},
{
"label": "AF: Flutter Package Get",
"type": "shell",
"command": "flutter packages pub get",
"options": {
"cwd": "${workspaceFolder}/appflowy_flutter"
}
},
{
"label": "AF: Generate Freezed Files",
"type": "shell",
@@ -209,34 +233,18 @@
"cwd": "${workspaceFolder}"
}
},
{
"label": "AF: Flutter Clean",
"type": "shell",
"command": "cargo make flutter_clean",
"group": "build",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "AF: flutter build aar",
"type": "flutter",
"command": "flutter",
"args": ["build", "aar"],
"args": [
"build",
"aar"
],
"group": "build",
"problemMatcher": [],
"detail": "appflowy_flutter"
},
{
"label": "AF: Tauri UI Dev",
"type": "shell",
"isBackground": true,
"command": "yarn",
"args": ["dev"],
"options": {
"cwd": "${workspaceFolder}/appflowy_tauri"
}
},
{
"label": "AF: Tauri UI Build",
"type": "shell",
@@ -246,9 +254,10 @@
}
},
{
"label": "AF: Tauri Dev",
"label": "AF: Tauri UI Dev",
"type": "shell",
"command": "npm run tauri:dev",
"isBackground": true,
"command": "pnpm sync:i18n && pnpm run dev",
"options": {
"cwd": "${workspaceFolder}/appflowy_tauri"
}
@@ -265,7 +274,10 @@
"label": "AF: Tauri Clean + Dev",
"type": "shell",
"dependsOrder": "sequence",
"dependsOn": ["AF: Tauri Clean", "AF: Tauri UI Dev"],
"dependsOn": [
"AF: Tauri Clean",
"AF: Tauri UI Dev"
],
"options": {
"cwd": "${workspaceFolder}"
}
@@ -281,10 +293,10 @@
{
"label": "AF: Generate Env File",
"type": "shell",
"command": "dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs ",
"command": "dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs",
"options": {
"cwd": "${workspaceFolder}/appflowy_flutter"
}
}
]
}
}
+32 -16
View File
@@ -10,6 +10,7 @@ extend = [
{ path = "scripts/makefile/flutter.toml" },
{ path = "scripts/makefile/tool.toml" },
{ path = "scripts/makefile/tauri.toml" },
{ path = "scripts/makefile/web.toml" },
]
[config]
@@ -25,9 +26,10 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi"
LIB_NAME = "dart_ffi"
CURRENT_APP_VERSION = "0.3.2"
APPFLOWY_VERSION = "0.5.2"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite"
PRODUCT_NAME = "AppFlowy"
MACOSX_DEPLOYMENT_TARGET = "11.0"
# CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
# If you update the macOS's CRATE_TYPE, don't forget to update the
# appflowy_backend.podspec
@@ -47,6 +49,8 @@ LIB_EXT = "a"
APP_ENVIRONMENT = "local"
FLUTTER_FLOWY_SDK_PATH = "appflowy_flutter/packages/appflowy_backend"
TAURI_BACKEND_SERVICE_PATH = "appflowy_tauri/src/services/backend"
WEB_BACKEND_SERVICE_PATH = "appflowy_web/src/services/backend"
WEB_LIB_PATH= "appflowy_web/wasm-libs/af-wasm"
# Test default config
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dylib"
@@ -126,6 +130,7 @@ FLUTTER_OUTPUT_DIR = "Release"
PRODUCT_EXT = "exe"
CRATE_TYPE = "cdylib"
LIB_EXT = "dll"
BUILD_ARCHS = "x64"
APP_ENVIRONMENT = "production"
[env.development-linux-x86_64]
@@ -186,6 +191,31 @@ RUST_COMPILE_TARGET = "aarch64-apple-ios"
BUILD_ARCHS = "arm64"
CRATE_TYPE = "staticlib"
[env.production-ios-arm64]
BUILD_FLAG = "release"
TARGET_OS = "ios"
FLUTTER_OUTPUT_DIR = "Release"
RUST_COMPILE_TARGET = "aarch64-apple-ios"
BUILD_ARCHS = "arm64"
CRATE_TYPE = "staticlib"
[env.development-android]
BUILD_FLAG = "debug"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Debug"
LIB_EXT = "so"
PRODUCT_EXT = "apk"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
[env.production-android]
BUILD_FLAG = "release"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Release"
PRODUCT_EXT = "apk"
LIB_EXT = "so"
[tasks.echo_env]
script = ['''
echo "-------- Env Parameters --------"
@@ -198,24 +228,10 @@ script = ['''
echo APP_ENVIRONMENT: ${APP_ENVIRONMENT}
echo ${platforms}
echo ${BUILD_ARCHS}
echo ${BUILD_VERSION}
''']
script_runner = "@shell"
[env.development-android]
BUILD_FLAG = "debug"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Debug"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
[env.production-android]
CARGO_PROFILE = "release"
BUILD_FLAG = "release"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Release"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
[tasks.setup-crate-type]
private = true
script = [
+2 -2
View File
@@ -69,8 +69,8 @@ windows/flutter/dart_ffi/
**/.sandbox
**/.vscode/
*.env
*.env.*
.env
.env.*
coverage/
+7 -7
View File
@@ -4,8 +4,8 @@
# This file should be version controlled.
version:
revision: 135454af32477f815a7525073027a3ff9eff1bfd
channel: stable
revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
channel: unknown
project_type: app
@@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
- platform: windows
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
- platform: android
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
# User provided section
+16 -18
View File
@@ -1,7 +1,7 @@
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
<div align="center">
<img src="https://img.shields.io/badge/Flutter-v3.10.1-blue"/>
<img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
<img src="https://img.shields.io/badge/Flutter-v3.13.19-blue"/>
<img src="https://img.shields.io/badge/Rust-v1.70-orange"/>
</div>
> Documentation for Contributors
@@ -13,11 +13,13 @@ This Repository contains the codebase for the frontend of the application, curre
- Linux
- macOS
- Windows
> We later expect to extend support to Android and iOS devices using Flutter.
> We are actively working on support for Android & iOS!
_Additionally, we are working on a Web version built with Tauri!_
### Am I Eligible to Contribute?
Yes! You are eligible to contribute, check out the ways in which you can [contribute to AppFlowy](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy). Some of the ways in which you can contribute are:
Yes! You are eligible to contribute, check out the ways in which you can [contribute to AppFlowy](https://docs.appflowy.io/docs/documentation/software-contributions/contributing-to-appflowy). Some of the ways in which you can contribute are:
- Non-Coding Contributions
- Documentation
@@ -26,27 +28,23 @@ Yes! You are eligible to contribute, check out the ways in which you can [contri
- Improve Translations
- Coding Contributions
To contribute to `AppFlowy_Flutter` codebase specifically (coding contribution) we suggest you to have basic knowledge of Flutter. In case you are new to Flutter, we may suggest you to learn the basics and then try to contribute, get started with Flutter [here](https://flutter.dev/docs/get-started/codelab).
To contribute to `AppFlowy_Flutter` codebase specifically (coding contribution) we suggest you to have basic knowledge of Flutter. In case you are new to Flutter, we suggest you learn the basics, and then contribute afterwards. To get started with Flutter read [here](https://flutter.dev/docs/get-started/codelab).
### What OS Should I Use for Development?
### What OS should I use for development?
We support all OS for Development i.e Linux, macOS and Windows. However, most of us promote macOS and Linux over Windows. We have detailed [docs](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup) on How to Setup `AppFlowy_Flutter` in your local system in each OS.
We support all OS for Development i.e. Linux, MacOS and Windows. However, most of us promote macOS and Linux over Windows. We have detailed [docs](https://docs.appflowy.io/docs/documentation/appflowy/from-source/environment-setup) on how to setup `AppFlowy_Flutter` on your local system respectively per operating system.
### Getting Started ❇
We have a detailed documentation, on how to [get started](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) with the project, and make your first contribution. However, we do have some specific picks for you.
We have detailed documentation on how to [get started](https://docs.appflowy.io/docs/documentation/software-contributions/contributing-to-appflowy) with the project, and make your first contribution. However, we do have some specific picks for you:
- [Code Architecture](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/architecture/frontend/frontend/codemap)
- [Making Your First PR](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/submitting-your-first-pull-request)
- [The Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides)
- [How to run/debug the application](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/launcher-and-tasks)
- [Styleguide & Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions/naming-conventions)
- [Making Your First PR](https://docs.appflowy.io/docs/documentation/software-contributions/submitting-code/submitting-your-first-pull-request)
- [All AppFlowy Documentation](https://docs.appflowy.io/docs/documentation/appflowy) - Contribution guide, build and run, debugging, testing, localization, etc.
### Need Help?
- New to GitHub? Follow [these](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/setting-up-your-repositories) steps to get started
- Stuck Somewhere? Join the [Discord](https://discord.gg/9Q2xaN37tV) Group and we are there to help you!
<!--
## release check
1. [entitlements](https://flutter.dev/desktop#setting-up-entitlements)
2. [symbols stripped](https://flutter.dev/docs/development/platform-integration/c-interop) -->
- New to GitHub? Follow [these](https://docs.appflowy.io/docs/documentation/software-contributions/submitting-code/setting-up-your-repositories) steps to get started
- Stuck Somewhere? Join our [Discord](https://discord.gg/9Q2xaN37tV), we're there to help you!
- Find out more about the [community initiatives](https://docs.appflowy.io/docs/appflowy/community).
@@ -30,10 +30,27 @@ linter:
rules:
- require_trailing_commas
- prefer_collection_literals
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- sized_box_for_whitespace
- use_decorated_box
- unnecessary_parenthesis
- unnecessary_await_in_return
- unnecessary_raw_strings
- avoid_unnecessary_containers
- avoid_redundant_argument_values
- avoid_unused_constructor_parameters
- always_declare_return_types
- sort_constructors_first
- unawaited_futures
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
@@ -11,3 +11,5 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
.cxx
@@ -25,8 +25,14 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 31
compileSdkVersion 34
ndkVersion "24.0.8215888"
compileOptions {
@@ -46,23 +52,41 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.appflowy.appflowy"
minSdkVersion 19
targetSdkVersion 31
minSdkVersion 29
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
externalNativeBuild {
cmake {
arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_STL=c++_shared"
}
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
minifyEnabled true
shrinkResources true
// use release instead when publishing the application to google play.
// signingConfig signingConfigs.release
signingConfig signingConfigs.debug
}
}
namespace 'io.appflowy.appflowy'
externalNativeBuild {
cmake {
path "src/main/CMakeLists.txt"
}
}
}
flutter {
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.appflowy.appflowy">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
@@ -1,42 +1,55 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.appflowy.appflowy">
<application
android:label="appflowy_flutter"
android:icon="@mipmap/ic_launcher"
android:name="${applicationName}">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="AppFlowy" android:icon="@mipmap/ic_launcher"
android:name="${applicationName}">
<activity android:name=".MainActivity"
android:exported="true"
android:launchMode="singleInstance"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!--
Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI.
-->
<meta-data android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!--
Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame.
-->
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="appflowy-flutter" />
<!-- <data android:host="login-callback" /> -->
</intent-filter>
</activity>
<!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
-->
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<queries>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
</manifest>
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.10.0)
project(AppFlowy)
message(CONFIGURE_LOG "NDK PATH: ${ANDROID_NDK}")
message(CONFIGURE_LOG "Copying libc++_shared.so")
# arm64-v8a
file(COPY
${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/jniLibs/arm64-v8a
)
# x86_64
file(COPY
${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/jniLibs/x86_64
)
@@ -0,0 +1,18 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
int64_t init_sdk(int64_t port, char *data);
void async_event(int64_t port, const uint8_t *input, uintptr_t len);
const uint8_t *sync_event(const uint8_t *input, uintptr_t len);
int32_t set_stream_port(int64_t port);
void link_me_please(void);
void rust_log(int64_t level, const char *data);
void set_env(const char *data);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.appflowy.appflowy">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
@@ -2,3 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
org.gradle.caching=true
android.suppressUnsupportedCompileSdk=33
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -73,9 +73,9 @@
"attributes": { "subtype": "checkbox", "checkbox": true },
"delta": [
{ "insert": "Click " },
{ "insert": "+ New Page ", "attributes": { "code": true } },
{ "insert": "+ New Page", "attributes": { "code": true } },
{
"insert": "button at the bottom of your sidebar to add a new page."
"insert": " button at the bottom of your sidebar to add a new page."
}
]
},
@@ -0,0 +1 @@
use_precompiled_binaries: true
+1
View File
@@ -0,0 +1 @@
APPFLOWY_CLOUD_URL=
@@ -0,0 +1 @@
extensions:
@@ -1,85 +0,0 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('auth', () {
testWidgets('sign in with supabase', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoogleLoginInButton();
tester.expectToSeeHomePage();
});
testWidgets('sign out with supabase', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
await tester.tapButton(find.byType(SettingLogoutButton));
tester.expectToSeeText(LocaleKeys.button_OK.tr());
await tester.tapButtonWithName(LocaleKeys.button_OK.tr());
// Go to the sign in page again
await tester.pumpAndSettle(const Duration(seconds: 1));
tester.expectToSeeGoogleLoginButton();
});
testWidgets('sign in as annoymous', (tester) async {
await tester.initializeAppFlowy();
await tester.tapSignInAsGuest();
// should not see the sync setting page when sign in as annoymous
await tester.openSettings();
await tester.expectNoSettingsPage(SettingsPage.syncSetting);
});
testWidgets('enable encryption', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.syncSetting);
// the switch should be off by default
tester.assertEnableEncryptSwitchValue(false);
await tester.toggleEnableEncrypt();
// the switch should be on after toggling
tester.assertEnableEncryptSwitchValue(true);
// the switch can not be toggled back to off
await tester.toggleEnableEncrypt();
tester.assertEnableEncryptSwitchValue(true);
});
testWidgets('enable sync', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.syncSetting);
// the switch should be on by default
tester.assertEnableSyncSwitchValue(true);
await tester.toggleEnableSync();
// the switch should be off
tester.assertEnableSyncSwitchValue(false);
// the switch should be on after toggling
await tester.toggleEnableSync();
tester.assertEnableSyncSwitchValue(true);
});
});
}
@@ -1,50 +0,0 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database_view/widgets/card/card.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('board row test', () {
testWidgets('delete item in ToDo card', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Board);
const name = 'Card 1';
final card1 = find.findTextInFlowyText(name);
await tester.hoverOnWidget(
card1,
onHover: () async {
final moreOption = find.byType(CardMoreOption);
await tester.tapButton(moreOption);
},
);
await tester.tapButtonWithName(LocaleKeys.button_delete.tr());
expect(find.findTextInFlowyText(name), findsNothing);
});
testWidgets('duplicate item in ToDo card', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Board);
const name = 'Card 1';
final card1 = find.findTextInFlowyText(name);
await tester.hoverOnWidget(
card1,
onHover: () async {
final moreOption = find.byType(CardMoreOption);
await tester.tapButton(moreOption);
},
);
await tester.tapButtonWithName(LocaleKeys.button_duplicate.tr());
expect(find.textContaining(name, findRichText: true), findsNWidgets(2));
});
});
}
@@ -1,10 +0,0 @@
import 'package:integration_test/integration_test.dart';
import 'board_row_test.dart' as board_row_test;
void startTesting() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// Board integration tests
board_row_test.main();
}
@@ -0,0 +1,69 @@
// ignore_for_file: unused_import
import 'dart:io';
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart' as p;
import 'package:integration_test/integration_test.dart';
import '../shared/dir.dart';
import '../shared/mock/mock_file_picker.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('appflowy cloud', () {
testWidgets('anon user and then sign in', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
tester.expectToSeeText(LocaleKeys.signIn_loginStartWithAnonymous.tr());
await tester.tapGoButton();
await tester.expectToSeeHomePageWithGetStartedPage();
// reanme the name of the anon user
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
final userNameFinder = find.descendant(
of: find.byType(SettingsUserView),
matching: find.byType(UserNameInput),
);
await tester.enterText(userNameFinder, 'local_user');
await tester.openSettingsPage(SettingsPage.user);
await tester.pumpAndSettle();
// sign up with Google
await tester.tapGoogleLoginInButton();
// sign out
await tester.expectToSeeHomePage();
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
await tester.logout();
await tester.pumpAndSettle();
// tap the continue as anonymous button
await tester
.tapButton(find.text(LocaleKeys.signIn_loginStartWithAnonymous.tr()));
await tester.expectToSeeHomePage();
// New anon user name
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
final userNameInput = tester.widget(userNameFinder) as UserNameInput;
expect(userNameInput.name, 'Me');
});
});
}
@@ -0,0 +1,85 @@
// ignore_for_file: unused_import
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:path/path.dart' as p;
import '../shared/mock/mock_file_picker.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('appflowy cloud auth', () {
testWidgets('sign in', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
});
testWidgets('sign out', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
await tester.tapButton(find.byType(SettingLogoutButton));
tester.expectToSeeText(LocaleKeys.button_ok.tr());
await tester.tapButtonWithName(LocaleKeys.button_ok.tr());
// Go to the sign in page again
await tester.pumpAndSettle(const Duration(seconds: 1));
tester.expectToSeeGoogleLoginButton();
});
testWidgets('sign in as anonymous', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
await tester.tapSignInAsGuest();
// should not see the sync setting page when sign in as anonymous
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
tester.expectToSeeGoogleLoginButton();
});
testWidgets('enable sync', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.cloud);
// the switch should be on by default
tester.assertAppFlowyCloudEnableSyncSwitchValue(true);
await tester.toggleEnableSync(AppFlowyCloudEnableSync);
// the switch should be off
tester.assertAppFlowyCloudEnableSyncSwitchValue(false);
// the switch should be on after toggling
await tester.toggleEnableSync(AppFlowyCloudEnableSync);
tester.assertAppFlowyCloudEnableSyncSwitchValue(true);
});
});
}
@@ -0,0 +1,20 @@
import 'anon_user_continue_test.dart' as anon_user_continue_test;
import 'appflowy_cloud_auth_test.dart' as appflowy_cloud_auth_test;
import 'collaborative_workspace_test.dart' as collaboration_workspace_test;
import 'empty_test.dart' as preset_af_cloud_env_test;
// import 'document_sync_test.dart' as document_sync_test;
import 'user_setting_sync_test.dart' as user_sync_test;
Future<void> main() async {
preset_af_cloud_env_test.main();
appflowy_cloud_auth_test.main();
// document_sync_test.main();
user_sync_test.main();
anon_user_continue_test.main();
collaboration_workspace_test.main();
}
@@ -0,0 +1,115 @@
// ignore_for_file: unused_import
import 'dart:io';
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/shared/feature_flags.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/home/menu/sidebar/sidebar_workspace.dart';
import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_actions.dart';
import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:appflowy/workspace/presentation/widgets/user_avatar.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:path/path.dart' as p;
import '../shared/database_test_op.dart';
import '../shared/dir.dart';
import '../shared/emoji.dart';
import '../shared/mock/mock_file_picker.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
final email = '${uuid()}@appflowy.io';
group('collaborative workspace', () {
// only run the test when the feature flag is on
if (!FeatureFlag.collaborativeWorkspace.isOn) {
return;
}
// combine the create and delete workspace test to reduce the time
testWidgets('create a new workspace, open it and then delete it',
(tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
email: email,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
const name = 'AppFlowy.IO';
await tester.createCollaborativeWorkspace(name);
// see the success message
var success = find.text(LocaleKeys.workspace_createSuccess.tr());
expect(success, findsOneWidget);
await tester.pumpUntilNotFound(success);
// check the create result
await tester.openCollaborativeWorkspaceMenu();
var items = find.byType(WorkspaceMenuItem);
expect(items, findsNWidgets(2));
expect(
tester.widget<WorkspaceMenuItem>(items.last).workspace.name,
name,
);
// open the newly created workspace
await tester.tapButton(items.last);
success = find.text(LocaleKeys.workspace_openSuccess.tr());
expect(success, findsOneWidget);
await tester.pumpUntilNotFound(success);
await tester.closeCollaborativeWorkspaceMenu();
// delete the newly created workspace
await tester.openCollaborativeWorkspaceMenu();
final secondWorkspace = find.byType(WorkspaceMenuItem).last;
await tester.hoverOnWidget(
secondWorkspace,
onHover: () async {
// click the more button
final moreButton = find.byType(WorkspaceMoreActionList);
expect(moreButton, findsOneWidget);
await tester.tapButton(moreButton);
// click the delete button
final deleteButton = find.text(LocaleKeys.button_delete.tr());
expect(deleteButton, findsOneWidget);
await tester.tapButton(deleteButton);
// see the delete confirm dialog
final confirm =
find.text(LocaleKeys.workspace_deleteWorkspaceHintText.tr());
expect(confirm, findsOneWidget);
await tester.tapButton(find.text(LocaleKeys.button_ok.tr()));
// delete success
success = find.text(LocaleKeys.workspace_createSuccess.tr());
expect(success, findsOneWidget);
await tester.pumpUntilNotFound(success);
},
);
// check the result
await tester.openCollaborativeWorkspaceMenu();
items = find.byType(WorkspaceMenuItem);
expect(items, findsOneWidget);
expect(
tester.widget<WorkspaceMenuItem>(items.last).workspace.name != name,
true,
);
await tester.closeCollaborativeWorkspaceMenu();
});
});
}
@@ -0,0 +1,70 @@
// ignore_for_file: unused_import
import 'dart:io';
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart' as p;
import 'package:integration_test/integration_test.dart';
import '../shared/dir.dart';
import '../shared/mock/mock_file_picker.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
final email = '${uuid()}@appflowy.io';
const inputContent = 'Hello world, this is a test document';
// The test will create a new document called Sample, and sync it to the server.
// Then the test will logout the user, and login with the same user. The data will
// be synced from the server.
group('appflowy cloud document', () {
testWidgets('sync local docuemnt to server', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
email: email,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
// create a new document called Sample
await tester.createNewPage();
// focus on the editor
await tester.editor.tapLineOfEditorAt(0);
await tester.ime.insertText(inputContent);
expect(find.text(inputContent, findRichText: true), findsOneWidget);
// TODO(nathan): remove the await
// 6 seconds for data sync
await tester.waitForSeconds(6);
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
await tester.logout();
});
testWidgets('sync doc from server', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
email: email,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePage();
// the latest document will be opened, so the content must be the inputContent
await tester.pumpAndSettle();
expect(find.text(inputContent, findRichText: true), findsOneWidget);
});
});
}
@@ -0,0 +1,18 @@
import 'package:appflowy/env/cloud_env.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../shared/util.dart';
// This test is meaningless, just for preventing the CI from failing.
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('Empty', () {
testWidgets('set appflowy cloud', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
);
});
});
}
@@ -0,0 +1,89 @@
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_supabase_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('supabase auth', () {
testWidgets('sign in with supabase', (tester) async {
await tester.initializeAppFlowy(cloudType: AuthenticatorType.supabase);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
});
testWidgets('sign out with supabase', (tester) async {
await tester.initializeAppFlowy(cloudType: AuthenticatorType.supabase);
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
await tester.tapButton(find.byType(SettingLogoutButton));
tester.expectToSeeText(LocaleKeys.button_ok.tr());
await tester.tapButtonWithName(LocaleKeys.button_ok.tr());
// Go to the sign in page again
await tester.pumpAndSettle(const Duration(seconds: 1));
tester.expectToSeeGoogleLoginButton();
});
testWidgets('sign in as anonymous', (tester) async {
await tester.initializeAppFlowy(cloudType: AuthenticatorType.supabase);
await tester.tapSignInAsGuest();
// should not see the sync setting page when sign in as anonymous
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
tester.expectToSeeGoogleLoginButton();
});
// testWidgets('enable encryption', (tester) async {
// await tester.initializeAppFlowy(cloudType: CloudType.supabase);
// await tester.tapGoogleLoginInButton();
// // Open the setting page and sign out
// await tester.openSettings();
// await tester.openSettingsPage(SettingsPage.cloud);
// // the switch should be off by default
// tester.assertEnableEncryptSwitchValue(false);
// await tester.toggleEnableEncrypt();
// // the switch should be on after toggling
// tester.assertEnableEncryptSwitchValue(true);
// // the switch can not be toggled back to off
// await tester.toggleEnableEncrypt();
// tester.assertEnableEncryptSwitchValue(true);
// });
testWidgets('enable sync', (tester) async {
await tester.initializeAppFlowy(cloudType: AuthenticatorType.supabase);
await tester.tapGoogleLoginInButton();
// Open the setting page and sign out
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.cloud);
// the switch should be on by default
tester.assertSupabaseEnableSyncSwitchValue(true);
await tester.toggleEnableSync(SupabaseEnableSync);
// the switch should be off
tester.assertSupabaseEnableSyncSwitchValue(false);
// the switch should be on after toggling
await tester.toggleEnableSync(SupabaseEnableSync);
tester.assertSupabaseEnableSyncSwitchValue(true);
});
});
}
@@ -0,0 +1,100 @@
// ignore_for_file: unused_import
import 'dart:io';
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart';
import 'package:appflowy/workspace/presentation/widgets/user_avatar.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart' as p;
import 'package:integration_test/integration_test.dart';
import '../shared/database_test_op.dart';
import '../shared/dir.dart';
import '../shared/emoji.dart';
import '../shared/mock/mock_file_picker.dart';
import '../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
final email = '${uuid()}@appflowy.io';
const name = 'nathan';
group('appflowy cloud setting', () {
testWidgets('sync user name and icon to server', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
email: email,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
// final userAvatarFinder = find.descendant(
// of: find.byType(SettingsUserView),
// matching: find.byType(UserAvatar),
// );
// Open icon picker dialog and select emoji
// await tester.tap(userAvatarFinder);
// await tester.pumpAndSettle();
// await tester.tapEmoji('😁');
// await tester.pumpAndSettle();
// final UserAvatar userAvatar =
// tester.widget(userAvatarFinder) as UserAvatar;
// expect(userAvatar.iconUrl, '😁');
// enter user name
final userNameFinder = find.descendant(
of: find.byType(SettingsUserView),
matching: find.byType(UserNameInput),
);
await tester.enterText(userNameFinder, name);
await tester.pumpAndSettle();
await tester.tapEscButton();
// wait 2 seconds for the sync to finish
await tester.pumpAndSettle(const Duration(seconds: 2));
});
});
testWidgets('get user icon and name from server', (tester) async {
await tester.initializeAppFlowy(
cloudType: AuthenticatorType.appflowyCloudSelfHost,
email: email,
);
await tester.tapGoogleLoginInButton();
await tester.expectToSeeHomePageWithGetStartedPage();
await tester.pumpAndSettle();
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.user);
// verify icon
// final userAvatarFinder = find.descendant(
// of: find.byType(SettingsUserView),
// matching: find.byType(UserAvatar),
// );
// final UserAvatar userAvatar = tester.widget(userAvatarFinder) as UserAvatar;
// expect(userAvatar.iconUrl, '😁');
// verify name
final userNameFinder = find.descendant(
of: find.byType(SettingsUserView),
matching: find.byType(UserNameInput),
);
final UserNameInput userNameInput =
tester.widget(userNameFinder) as UserNameInput;
expect(userNameInput.name, name);
});
}
@@ -1,193 +0,0 @@
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('calendar', () {
testWidgets('update calendar layout', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);
// open setting
await tester.tapDatabaseSettingButton();
await tester.tapDatabaseLayoutButton();
await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Board);
await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Board);
await tester.tapDatabaseSettingButton();
await tester.tapDatabaseLayoutButton();
await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Grid);
await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Grid);
await tester.pumpAndSettle();
});
testWidgets('calendar start from day setting', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create calendar view
const name = 'calendar';
await tester.createNewPageWithName(
name: name,
layout: ViewLayoutPB.Calendar,
);
// Open setting
await tester.tapDatabaseSettingButton();
await tester.tapCalendarLayoutSettingButton();
// select the first day of week is Monday
await tester.tapFirstDayOfWeek();
await tester.tapFirstDayOfWeekStartFromMonday();
// Open the other page and open the new calendar page again
await tester.openPage(gettingStarted);
await tester.pumpAndSettle(const Duration(milliseconds: 300));
await tester.openPage(name, layout: ViewLayoutPB.Calendar);
// Open setting again and check the start from Monday is selected
await tester.tapDatabaseSettingButton();
await tester.tapCalendarLayoutSettingButton();
await tester.tapFirstDayOfWeek();
tester.assertFirstDayOfWeekStartFromMonday();
await tester.pumpAndSettle();
});
testWidgets('creating and editing calendar events', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create the calendar view
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);
// Scroll until today's date cell is visible
await tester.scrollToToday();
// Hover over today's calendar cell
await tester.hoverOnTodayCalendarCell();
// Tap on create new event button
await tester.tapAddCalendarEventButton();
// Make sure that the row details page is opened
tester.assertRowDetailPageOpened();
// Dismiss the row details page
await tester.dismissRowDetailPage();
tester.assertNumberOfEventsInCalendar(1);
// Double click on today's calendar cell to create a new event
await tester.doubleClickCalendarCell(DateTime.now());
// Make sure that the row details page is opened
tester.assertRowDetailPageOpened();
// Dismiss the row details page
await tester.dismissRowDetailPage();
// Make sure that the event is inserted in the cell
tester.assertNumberOfEventsInCalendar(2);
// Click on the event
await tester.openCalendarEvent(index: 0);
tester.assertRowDetailPageOpened();
// Change the title of the event
await tester.editTitleInRowDetailPage('hello world');
await tester.dismissRowDetailPage();
// Make sure that the event is edited
tester.assertNumberOfEventsInCalendar(1, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(2, DateTime.now());
// Click on the event
await tester.openCalendarEvent(index: 1);
tester.assertRowDetailPageOpened();
// Duplicate the event
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDuplicateRowButton();
await tester.dismissRowDetailPage();
// Check that there are 2 events
tester.assertNumberOfEventsInCalendar(2, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(3, DateTime.now());
// Delete an event
await tester.openCalendarEvent(index: 1);
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDeleteRowButton();
// Check that there is 1 event
tester.assertNumberOfEventsInCalendar(1, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(2, DateTime.now());
});
testWidgets('rescheduling events', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create the calendar view
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);
// Create a new event on the first of this month
final today = DateTime.now();
final firstOfThisMonth = DateTime(today.year, today.month, 1);
await tester.doubleClickCalendarCell(firstOfThisMonth);
await tester.dismissRowDetailPage();
// Drag and drop the event onto the next week, same day
await tester.dragDropRescheduleCalendarEvent(firstOfThisMonth);
// Make sure that the event has been rescheduled to the new date
final sameDayNextWeek = firstOfThisMonth.add(const Duration(days: 7));
tester.assertNumberOfEventsInCalendar(1);
tester.assertNumberOfEventsOnSpecificDay(1, sameDayNextWeek);
// Delete the event
await tester.openCalendarEvent(index: 0, date: sameDayNextWeek);
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDeleteRowButton();
// Create a new event in today's calendar cell
await tester.scrollToToday();
await tester.doubleClickCalendarCell(today);
await tester.dismissRowDetailPage();
// Make sure that the event is today
tester.assertNumberOfEventsOnSpecificDay(1, today);
// Click on the event
await tester.openCalendarEvent(index: 0);
// Open the date editor of the event
await tester.tapDateCellInRowDetailPage();
await tester.findDateEditor(findsOneWidget);
// Edit the event's date. To avoid selecting a day outside of the current month, the new date will be one day closer to the middle of the month.
final newDate = today.day < 15
? today.add(const Duration(days: 1))
: today.subtract(const Duration(days: 1));
await tester.selectDay(content: newDate.day);
await tester.dismissCellEditor();
// Dismiss the row details page
await tester.dismissRowDetailPage();
// Make sure that the event is edited
tester.assertNumberOfEventsInCalendar(1);
tester.assertNumberOfEventsOnSpecificDay(1, newDate);
});
});
}
@@ -1,552 +0,0 @@
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/protobuf.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:intl/intl.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid cell', () {
testWidgets('edit text cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'hello world',
);
await tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'hello world',
);
await tester.pumpAndSettle();
});
// Makesure the text cells are filled with the right content when there are
// multiple text cell
testWidgets('edit multiple text cells', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(
name: 'my grid',
layout: ViewLayoutPB.Grid,
);
await tester.createField(FieldType.RichText, 'description');
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'hello',
);
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'world',
cellIndex: 1,
);
await tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'hello',
cellIndex: 0,
);
await tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'world',
cellIndex: 1,
);
await tester.pumpAndSettle();
});
testWidgets('edit number cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.Number;
// Create a number field
await tester.createField(fieldType, fieldType.name);
await tester.editCell(
rowIndex: 0,
fieldType: fieldType,
input: '-1',
);
// edit the next cell to force the previous cell at row 0 to lose focus
await tester.editCell(
rowIndex: 1,
fieldType: fieldType,
input: '0.2',
);
// -1 -> -1
await tester.assertCellContent(
rowIndex: 0,
fieldType: fieldType,
content: '-1',
);
// edit the next cell to force the previous cell at row 1 to lose focus
await tester.editCell(
rowIndex: 2,
fieldType: fieldType,
input: '.1',
);
// 0.2 -> 0.2
await tester.assertCellContent(
rowIndex: 1,
fieldType: fieldType,
content: '0.2',
);
// edit the next cell to force the previous cell at row 2 to lose focus
await tester.editCell(
rowIndex: 0,
fieldType: fieldType,
input: '',
);
// .1 -> 0.1
await tester.assertCellContent(
rowIndex: 2,
fieldType: fieldType,
content: '0.1',
);
await tester.pumpAndSettle();
});
testWidgets('edit checkbox cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.assertCheckboxCell(rowIndex: 0, isSelected: false);
await tester.tapCheckboxCellInGrid(rowIndex: 0);
await tester.assertCheckboxCell(rowIndex: 0, isSelected: true);
await tester.tapCheckboxCellInGrid(rowIndex: 1);
await tester.tapCheckboxCellInGrid(rowIndex: 2);
await tester.assertCheckboxCell(rowIndex: 1, isSelected: true);
await tester.assertCheckboxCell(rowIndex: 2, isSelected: true);
await tester.pumpAndSettle();
});
testWidgets('edit create time cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.CreatedTime;
// Create a create time field
// The create time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsNothing);
await tester.pumpAndSettle();
});
testWidgets('edit last time cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.LastEditedTime;
// Create a last time field
// The last time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsNothing);
await tester.pumpAndSettle();
});
testWidgets('edit time cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.DateTime;
await tester.createField(fieldType, fieldType.name);
// Tap the cell to invoke the field editor
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Toggle include time
await tester.toggleIncludeTime();
// Dismiss the cell editor
await tester.dismissCellEditor();
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Turn off include time
await tester.toggleIncludeTime();
// Select a date
final today = DateTime.now();
await tester.selectDay(content: today.day);
await tester.dismissCellEditor();
await tester.assertDateCellInGrid(
rowIndex: 0,
content: DateFormat('MMM dd, y').format(today),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Toggle include time
final now = DateTime.now();
await tester.toggleIncludeTime();
await tester.dismissCellEditor();
await tester.assertDateCellInGrid(
rowIndex: 0,
content: DateFormat('MMM dd, y HH:mm').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Change date format
await tester.changeDateFormat();
await tester.dismissCellEditor();
await tester.assertDateCellInGrid(
rowIndex: 0,
content: DateFormat('dd/MM/y HH:mm').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Change time format
await tester.changeTimeFormat();
await tester.dismissCellEditor();
await tester.assertDateCellInGrid(
rowIndex: 0,
content: DateFormat('dd/MM/y hh:mm a').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Clear the date and time
await tester.clearDate();
await tester.assertDateCellInGrid(
rowIndex: 0,
content: '',
);
await tester.pumpAndSettle();
});
testWidgets('edit single select cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
const fieldType = FieldType.SingleSelect;
// When create a grid, it will create a single select field by default
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create a new select option
await tester.createOption(name: 'tag 1');
await tester.dismissCellEditor();
// Make sure the option is created and displayed in the cell
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 1',
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create another select option
await tester.createOption(name: 'tag 2');
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 2',
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsOneWidget,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// switch to first option
await tester.selectOption(name: 'tag 1');
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 1',
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsOneWidget,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Deselect the currently-selected option
await tester.selectOption(name: 'tag 1');
await tester.dismissCellEditor();
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNothing,
);
await tester.pumpAndSettle();
});
testWidgets('edit multi select cell', (tester) async {
final tags = [
'tag 1',
'tag 2',
'tag 3',
'tag 4',
];
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.MultiSelect;
await tester.createField(fieldType, fieldType.name);
// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create a new select option
await tester.createOption(name: tags.first);
await tester.dismissCellEditor();
// Make sure the option is created and displayed in the cell
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags.first,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create some other select options
await tester.createOption(name: tags[1]);
await tester.createOption(name: tags[2]);
await tester.createOption(name: tags[3]);
await tester.dismissCellEditor();
for (final tag in tags) {
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tag,
);
}
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNWidgets(4),
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Deselect all options
for (final tag in tags) {
await tester.selectOption(name: tag);
}
await tester.dismissCellEditor();
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNothing,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Select some options
await tester.selectOption(name: tags[1]);
await tester.selectOption(name: tags[3]);
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags[1],
);
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags[3],
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNWidgets(2),
);
await tester.pumpAndSettle();
});
});
testWidgets('edit checklist cell', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.Checklist;
await tester.createField(fieldType, fieldType.name);
// assert that there is no progress bar in the grid
tester.assertChecklistCellInGrid(rowIndex: 0, percent: null);
// tap on the first checklist cell
await tester.tapChecklistCellInGrid(rowIndex: 0);
// assert that the checklist editor is shown
tester.assertChecklistEditorVisible(visible: true);
// assert that new task editor is shown
tester.assertNewCheckListTaskEditorVisible(visible: true);
// create a new task with enter
await tester.createNewChecklistTask(name: "task 0", enter: true);
// assert that the task is displayed
tester.assertChecklistTaskInEditor(
index: 0,
name: "task 0",
isChecked: false,
);
// update the task's name
await tester.renameChecklistTask(index: 0, name: "task 1");
// assert that the task's name is updated
tester.assertChecklistTaskInEditor(
index: 0,
name: "task 1",
isChecked: false,
);
// dismiss new task editor
await tester.dismissCellEditor();
tester.assertNewCheckListTaskEditorVisible(visible: false);
// dismiss checklist cell editor
await tester.dismissCellEditor();
// assert that progress bar is shown in grid at 0%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 0);
// start editing the first checklist cell again, click on new task button
await tester.tapChecklistCellInGrid(rowIndex: 0);
tester.assertNewCheckListTaskEditorVisible(visible: false);
await tester.tapChecklistNewTaskButton();
tester.assertNewCheckListTaskEditorVisible(visible: true);
// create another task with the create button
await tester.createNewChecklistTask(name: "task 2", button: true);
// assert that the task was inserted
tester.assertChecklistTaskInEditor(
index: 1,
name: "task 2",
isChecked: false,
);
// mark it as complete
await tester.checkChecklistTask(index: 1);
// assert that the task was checked in the editor
tester.assertChecklistTaskInEditor(
index: 1,
name: "task 2",
isChecked: true,
);
// dismiss checklist editor
await tester.dismissCellEditor();
await tester.dismissCellEditor();
// assert that progressbar is shown in grid at 50%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 0.5);
// re-open the cell editor
await tester.tapChecklistCellInGrid(rowIndex: 0);
// hover over first task and delete it
await tester.deleteChecklistTask(index: 0);
// dismiss cell editor
await tester.dismissCellEditor();
// assert that progressbar is shown in grid at 100%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 1);
// re-open the cell edior
await tester.tapChecklistCellInGrid(rowIndex: 0);
// delete the remaining task
await tester.deleteChecklistTask(index: 0);
// assert that the new task editor is shown
tester.assertNewCheckListTaskEditorVisible(visible: true);
// dismiss the cell editor
await tester.dismissCellEditor();
// check that the progress bar is not viisble
tester.assertChecklistCellInGrid(rowIndex: 0, percent: null);
});
}
@@ -1,55 +0,0 @@
import 'package:appflowy/plugins/database_view/grid/presentation/grid_page.dart';
import 'package:appflowy/plugins/database_view/tar_bar/tar_bar_add_button.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('database field settings', () {
testWidgets('field visibility', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.grid);
// create a field
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField('New field 1');
await tester.dismissFieldEditor();
// hide the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapHidePropertyButton();
await tester.noFieldWithName('New field 1');
// go back to inline database view, expect field to be shown
await tester.tapTabBarLinkedViewByViewName('Untitled');
await tester.findFieldWithName('New field 1');
// go back to linked database view, expect field to be hidden
await tester.tapTabBarLinkedViewByViewName('grid');
await tester.noFieldWithName('New field 1');
// use the settings button to show the field
await tester.tapDatabaseSettingButton();
await tester.tapViewPropertiesButton();
await tester.tapViewTogglePropertyVisibilityButtonByName('New field 1');
await tester.dismissFieldEditor();
await tester.findFieldWithName('New field 1');
// open first row in popup then hide the field
await tester.openFirstRowDetailPage();
await tester.tapGridFieldWithNameInRowDetailPage('New field 1');
await tester.tapHidePropertyButtonInFieldEditor();
await tester.dismissRowDetailPage();
await tester.noFieldWithName('New field 1');
});
});
}
@@ -1,189 +0,0 @@
import 'package:appflowy/plugins/database_view/grid/presentation/grid_page.dart';
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/type_option/select_option.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/protobuf.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid page', () {
testWidgets('rename existing field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.tapGridFieldWithName('Name');
await tester.tapEditPropertyButton();
await tester.renameField('hello world');
await tester.dismissFieldEditor();
await tester.tapGridFieldWithName('hello world');
await tester.pumpAndSettle();
});
testWidgets('update field type of existing field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditPropertyButton();
await tester.tapTypeOptionButton();
await tester.selectFieldType(FieldType.Checkbox);
await tester.dismissFieldEditor();
await tester.assertFieldTypeWithFieldName(
'Type',
FieldType.Checkbox,
);
await tester.pumpAndSettle();
});
testWidgets('create a field and rename it', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// create a field
await tester.createField(FieldType.Checklist, 'checklist');
// check the field is created successfully
await tester.findFieldWithName('checklist');
await tester.pumpAndSettle();
});
testWidgets('delete field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// create a field
await tester.createField(FieldType.Checkbox, 'New field 1');
// Delete the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapDeletePropertyButton();
// confirm delete
await tester.tapDialogOkButton();
await tester.noFieldWithName('New field 1');
await tester.pumpAndSettle();
});
testWidgets('duplicate field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// create a field
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField('New field 1');
await tester.dismissFieldEditor();
// Delete the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapDuplicatePropertyButton();
await tester.findFieldWithName('New field 1 (copy)');
await tester.pumpAndSettle();
});
testWidgets('create checklist field ', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
// Open the type option menu
await tester.tapTypeOptionButton();
await tester.selectFieldType(FieldType.Checklist);
// After update the field type, the cells should be updated
await tester.findCellByFieldType(FieldType.Checklist);
await tester.pumpAndSettle();
});
testWidgets('create list of fields', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
for (final fieldType in [
FieldType.Checklist,
FieldType.DateTime,
FieldType.Number,
FieldType.URL,
FieldType.MultiSelect,
FieldType.LastEditedTime,
FieldType.CreatedTime,
FieldType.Checkbox,
]) {
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField(fieldType.name);
// Open the type option menu
await tester.tapTypeOptionButton();
await tester.selectFieldType(fieldType);
await tester.dismissFieldEditor();
// After update the field type, the cells should be updated
await tester.findCellByFieldType(fieldType);
await tester.pumpAndSettle();
}
});
testWidgets('add option', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(
layout: ViewLayoutPB.Grid,
);
// Invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditPropertyButton();
// tap 'add option' button
await tester.tapAddSelectOptionButton();
const text = 'Hello AppFlowy';
final inputField = find.descendant(
of: find.byType(CreateOptionTextField),
matching: find.byType(TextField),
);
await tester.enterText(inputField, text);
await tester.pumpAndSettle();
await tester.testTextInput.receiveAction(TextInputAction.done);
await tester.pumpAndSettle(const Duration(seconds: 1));
// check the result
tester.expectToSeeText(text);
});
});
}
@@ -1,299 +0,0 @@
import 'package:appflowy/plugins/database_view/widgets/row/row_banner.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/emoji.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid', () {
testWidgets('row details page opens', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Make sure that the row page is opened
tester.assertRowDetailPageOpened();
});
testWidgets('insert emoji in the row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.switchToEmojiList();
await tester.tapEmoji('😀');
// After select the emoji, the EmojiButton will show up
await tester.tapButton(find.byType(EmojiButton));
});
testWidgets('update emoji in the row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.switchToEmojiList();
await tester.tapEmoji('😀');
// Update existing selected emoji
await tester.tapButton(find.byType(EmojiButton));
await tester.switchToEmojiList();
await tester.tapEmoji('😅');
// The emoji already displayed in the row banner
final emojiText = find.byWidgetPredicate(
(widget) => widget is FlowyText && widget.text == '😅',
);
// The number of emoji should be two. One in the row displayed in the grid
// one in the row detail page.
expect(emojiText, findsNWidgets(2));
});
testWidgets('remove emoji in the row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.switchToEmojiList();
await tester.tapEmoji('😀');
// Remove the emoji
await tester.tapButton(find.byType(RemoveEmojiButton));
final emojiText = find.byWidgetPredicate(
(widget) => widget is FlowyText && widget.text == '😀',
);
expect(emojiText, findsNothing);
});
testWidgets('create list of fields in row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
for (final fieldType in [
FieldType.Checklist,
FieldType.DateTime,
FieldType.Number,
FieldType.URL,
FieldType.MultiSelect,
FieldType.LastEditedTime,
FieldType.CreatedTime,
FieldType.Checkbox,
]) {
await tester.tapRowDetailPageCreatePropertyButton();
await tester.renameField(fieldType.name);
// Open the type option menu
await tester.tapTypeOptionButton();
await tester.selectFieldType(fieldType);
await tester.dismissFieldEditor();
// After update the field type, the cells should be updated
await tester.findCellByFieldType(fieldType);
await tester.scrollRowDetailByOffset(const Offset(0, -50));
}
});
testWidgets('change order of fields and cells', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Assert that the first field in the row details page is the select
// option tyoe
tester.assertFirstFieldInRowDetailByType(FieldType.SingleSelect);
// Reorder first field in list
final gesture = await tester.hoverOnFieldInRowDetail(index: 0);
await tester.pumpAndSettle();
await tester.reorderFieldInRowDetail(offset: 30);
// Orders changed, now the checkbox is first
tester.assertFirstFieldInRowDetailByType(FieldType.Checkbox);
await gesture.removePointer();
await tester.pumpAndSettle();
// Reorder second field in list
await tester.hoverOnFieldInRowDetail(index: 1);
await tester.pumpAndSettle();
await tester.reorderFieldInRowDetail(offset: -30);
// First field is now back to select option
tester.assertFirstFieldInRowDetailByType(FieldType.SingleSelect);
});
testWidgets('check document exists in row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Each row detail page should have a document
await tester.assertDocumentExistInRowDetailPage();
});
testWidgets('update the contents of the document and re-open it',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Wait for the document to be loaded
await tester.wait(500);
// Focus on the editor
final textBlock = find.byType(TextBlockComponentWidget);
await tester.tapAt(tester.getCenter(textBlock));
await tester.pumpAndSettle();
// Input some text
const inputText = 'Hello World';
await tester.ime.insertText(inputText);
expect(
find.textContaining(inputText, findRichText: true),
findsOneWidget,
);
// Tap outside to dismiss the field
await tester.tapAt(Offset.zero);
await tester.pumpAndSettle();
// Re-open the document
await tester.openFirstRowDetailPage();
expect(
find.textContaining(inputText, findRichText: true),
findsOneWidget,
);
});
testWidgets(
'check if the title wraps properly when a long text is inserted',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Wait for the document to be loaded
await tester.wait(500);
// Focus on the editor
final textField = find
.descendant(
of: find.byType(SimpleDialog),
matching: find.byType(TextField),
)
.first;
// Input a long text
await tester.enterText(textField, 'Long text' * 25);
await tester.pumpAndSettle();
// Tap outside to dismiss the field
await tester.tapAt(Offset.zero);
await tester.pumpAndSettle();
// Check if there is any overflow in the widget tree
expect(tester.takeException(), isNull);
// Re-open the document
await tester.openFirstRowDetailPage();
// Check again if there is any overflow in the widget tree
expect(tester.takeException(), isNull);
});
testWidgets('delete row in row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDeleteRowButton();
await tester.tapEscButton();
await tester.assertNumberOfRowsInGridPage(2);
});
testWidgets('duplicate row in row detail page', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDuplicateRowButton();
await tester.tapEscButton();
await tester.assertNumberOfRowsInGridPage(4);
});
});
}
@@ -1,68 +0,0 @@
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid', () {
testWidgets('create row of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.tapCreateRowButtonInGrid();
// The initial number of rows is 3
await tester.assertNumberOfRowsInGridPage(4);
await tester.pumpAndSettle();
});
testWidgets('create row from row menu of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.hoverOnFirstRowOfGrid();
await tester.tapCreateRowButtonInRowMenuOfGrid();
// The initial number of rows is 3
await tester.assertNumberOfRowsInGridPage(4);
await tester.assertRowCountInGridPage(4);
await tester.pumpAndSettle();
});
testWidgets('delete row of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.hoverOnFirstRowOfGrid();
// Open the row menu and then click the delete
await tester.tapRowMenuButtonInGrid();
await tester.tapDeleteOnRowMenu();
// The initial number of rows is 3
await tester.assertNumberOfRowsInGridPage(2);
await tester.assertRowCountInGridPage(2);
await tester.pumpAndSettle();
});
testWidgets('check number of row indicator in the initial grid',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.assertRowCountInGridPage(3);
await tester.pumpAndSettle();
});
});
}
@@ -1,268 +0,0 @@
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid', () {
testWidgets('add text sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.RichText, 'Name');
// check the text cell order
final textCells = <String>[
'A',
'B',
'C',
'D',
'E',
'',
'',
'',
'',
'',
];
for (final (index, content) in textCells.indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Name');
await tester.tapSortByDescending();
for (final (index, content) in <String>[
'E',
'D',
'C',
'B',
'A',
'',
'',
'',
'',
'',
].indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
// delete all sorts
await tester.tapSortMenuInSettingBar();
await tester.tapAllSortButton();
// check the text cell order
for (final (index, content) in <String>[
'A',
'B',
'C',
'D',
'E',
'',
'',
'',
'',
'',
].indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add checkbox sort', (tester) async {
await tester.openV020database();
// create a filter
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Checkbox, 'Done');
// check the checkbox cell order
for (final (index, content) in <bool>[
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Done');
await tester.tapSortByDescending();
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add number sort', (tester) async {
await tester.openV020database();
// create a filter
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Number, 'number');
// check the number cell order
for (final (index, content) in <String>[
'-2',
'-1',
'0.1',
'0.2',
'1',
'2',
'10',
'11',
'12',
'',
].indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('number');
await tester.tapSortByDescending();
for (final (index, content) in <String>[
'12',
'11',
'10',
'2',
'1',
'0.2',
'0.1',
'-1',
'-2',
'',
].indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add checkbox and number sort', (tester) async {
await tester.openV020database();
// create a filter
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Checkbox, 'Done');
// open the sort menu and sort checkbox by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Done');
await tester.tapSortByDescending();
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// add another sort, this time by number descending
await tester.tapSortMenuInSettingBar();
await tester.tapCreateSortByFieldTypeInSortMenu(
FieldType.Number,
'number',
);
await tester.tapSortButtonByName('number');
await tester.tapSortByDescending();
// check checkbox cell order
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// check number cell order
for (final (index, content) in <String>[
'1',
'0.2',
'0.1',
'-1',
'-2',
'12',
'11',
'10',
'2',
'',
].indexed) {
await tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
await tester.pumpAndSettle();
});
});
}
@@ -1,78 +0,0 @@
import 'package:appflowy/plugins/database_view/tar_bar/tar_bar_add_button.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('database', () {
testWidgets('create linked view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// Create grid view
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.grid);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Grid);
// Create calendar view
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.calendar);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Calendar);
await tester.pumpAndSettle();
});
testWidgets('rename and delete linked view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// rename board view
await tester.renameLinkedView(
tester.findTabBarLinkViewByViewLayout(ViewLayoutPB.Board),
'new board',
);
final findBoard = tester.findTabBarLinkViewByViewName('new board');
expect(findBoard, findsOneWidget);
// delete the board
await tester.deleteDatebaseView(findBoard);
expect(tester.findTabBarLinkViewByViewName('new board'), findsNothing);
await tester.pumpAndSettle();
});
testWidgets('delete the last database view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(AddButtonAction.board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// delete the board
await tester.deleteDatebaseView(
tester.findTabBarLinkViewByViewLayout(ViewLayoutPB.Board),
);
await tester.pumpAndSettle();
});
});
}
@@ -0,0 +1,103 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/database/board/presentation/widgets/board_column_header.dart';
import 'package:appflowy/plugins/database/widgets/card/container/card_container.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:appflowy_board/appflowy_board.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/util.dart';
const defaultFirstCardName = 'Card 1';
const defaultLastCardName = 'Card 3';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('board add row test:', () {
testWidgets('from header', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
final findFirstCard = find.descendant(
of: find.byType(AppFlowyGroupCard),
matching: find.byType(Text),
);
Text firstCardText = tester.firstWidget(findFirstCard);
expect(firstCardText.data, defaultFirstCardName);
await tester.tap(
find
.descendant(
of: find.byType(BoardColumnHeader),
matching: find.byWidgetPredicate(
(widget) => widget is FlowySvg && widget.svg == FlowySvgs.add_s,
),
)
.at(1),
);
await tester.pumpAndSettle();
const newCardName = 'Card 4';
await tester.enterText(
find.descendant(
of: find.byType(RowCardContainer),
matching: find.byType(TextField),
),
newCardName,
);
await tester.pumpAndSettle(const Duration(milliseconds: 500));
await tester.tap(find.byType(AppFlowyBoard));
await tester.pumpAndSettle();
firstCardText = tester.firstWidget(findFirstCard);
expect(firstCardText.data, newCardName);
});
testWidgets('from footer', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
final findLastCard = find.descendant(
of: find.byType(AppFlowyGroupCard),
matching: find.byType(Text),
);
Text? lastCardText = tester.widgetList(findLastCard).last as Text;
expect(lastCardText.data, defaultLastCardName);
await tester.tap(
find
.descendant(
of: find.byType(AppFlowyGroupFooter),
matching: find.byType(FlowySvg),
)
.at(1),
);
await tester.pumpAndSettle();
const newCardName = 'Card 4';
await tester.enterText(
find.descendant(
of: find.byType(RowCardContainer),
matching: find.byType(TextField),
),
newCardName,
);
await tester.pumpAndSettle(const Duration(milliseconds: 500));
await tester.tap(find.byType(AppFlowyBoard));
await tester.pumpAndSettle();
lastCardText = tester.widgetList(findLastCard).last as Text;
expect(lastCardText.data, newCardName);
});
});
}
@@ -0,0 +1,50 @@
import 'package:appflowy/plugins/database/widgets/cell_editor/extension.dart';
import 'package:appflowy/plugins/database/widgets/row/row_property.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:appflowy_board/appflowy_board.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('board group test', () {
testWidgets('move row to another group', (tester) async {
const card1Name = 'Card 1';
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
final card1 = find.ancestor(
of: find.text(card1Name),
matching: find.byType(AppFlowyGroupCard),
);
final doingGroup = find.text('Doing');
final doingGroupCenter = tester.getCenter(doingGroup);
final card1Center = tester.getCenter(card1);
await tester.timedDrag(
card1,
doingGroupCenter.translate(-card1Center.dx, -card1Center.dy),
const Duration(seconds: 1),
);
await tester.pumpAndSettle();
await tester.tap(card1);
await tester.pumpAndSettle();
final card1StatusFinder = find.descendant(
of: find.byType(RowPropertyList),
matching: find.descendant(
of: find.byType(SelectOptionTag),
matching: find.byType(Text),
),
);
expect(card1StatusFinder, findsNWidgets(1));
final card1StatusText = tester.widget<Text>(card1StatusFinder).data;
expect(card1StatusText, 'Doing');
});
});
}
@@ -0,0 +1,141 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/database/board/presentation/widgets/board_column_header.dart';
import 'package:appflowy/plugins/database/board/presentation/widgets/board_hidden_groups.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('board group options:', () {
testWidgets('expand/collapse hidden groups', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
final collapseFinder = find.byFlowySvg(FlowySvgs.pull_left_outlined_s);
final expandFinder = find.byFlowySvg(FlowySvgs.hamburger_s_s);
// Is expanded by default
expect(collapseFinder, findsOneWidget);
expect(expandFinder, findsNothing);
// Collapse hidden groups
await tester.tap(collapseFinder);
await tester.pumpAndSettle();
// Is collapsed
expect(collapseFinder, findsNothing);
expect(expandFinder, findsOneWidget);
// Expand hidden groups
await tester.tap(expandFinder);
await tester.pumpAndSettle();
// Is expanded
expect(collapseFinder, findsOneWidget);
expect(expandFinder, findsNothing);
});
testWidgets('hide first group, and show it again', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
// Tap the options of the first group
final optionsFinder = find
.descendant(
of: find.byType(BoardColumnHeader),
matching: find.byFlowySvg(FlowySvgs.details_horizontal_s),
)
.first;
await tester.tap(optionsFinder);
await tester.pumpAndSettle();
// Tap the hide option
await tester.tap(find.byFlowySvg(FlowySvgs.hide_s));
await tester.pumpAndSettle();
int shownGroups =
tester.widgetList(find.byType(BoardColumnHeader)).length;
// We still show Doing, Done, No Status
expect(shownGroups, 3);
final hiddenCardFinder = find.byType(HiddenGroupCard);
await tester.hoverOnWidget(hiddenCardFinder);
await tester.tap(find.byFlowySvg(FlowySvgs.show_m));
await tester.pumpAndSettle();
shownGroups = tester.widgetList(find.byType(BoardColumnHeader)).length;
expect(shownGroups, 4);
});
});
testWidgets('delete a group', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
expect(tester.widgetList(find.byType(BoardColumnHeader)).length, 4);
// tap group option button for the first group. Delete shouldn't show up
await tester.tapButton(
find
.descendant(
of: find.byType(BoardColumnHeader),
matching: find.byFlowySvg(FlowySvgs.details_horizontal_s),
)
.first,
);
expect(find.byFlowySvg(FlowySvgs.delete_s), findsNothing);
// dismiss the popup
await tester.sendKeyEvent(LogicalKeyboardKey.escape);
await tester.pumpAndSettle();
// tap group option button for the first group. Delete should show up
await tester.tapButton(
find
.descendant(
of: find.byType(BoardColumnHeader),
matching: find.byFlowySvg(FlowySvgs.details_horizontal_s),
)
.at(1),
);
expect(find.byFlowySvg(FlowySvgs.delete_s), findsOneWidget);
// Tap the delete button and confirm
await tester.tapButton(find.byFlowySvg(FlowySvgs.delete_s));
await tester.tapDialogOkButton();
// Expect number of groups to decrease by one
expect(tester.widgetList(find.byType(BoardColumnHeader)).length, 3);
});
}
extension FlowySvgFinder on CommonFinders {
Finder byFlowySvg(FlowySvgData svg) => _FlowySvgFinder(svg);
}
class _FlowySvgFinder extends MatchFinder {
_FlowySvgFinder(this.svg);
final FlowySvgData svg;
@override
String get description => 'flowy_svg "$svg"';
@override
bool matches(Element candidate) {
final Widget widget = candidate.widget;
return widget is FlowySvg && widget.svg == svg;
}
}
@@ -0,0 +1,104 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/widgets/card/card.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:appflowy_board/appflowy_board.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/util.dart';
import '../../shared/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('board row test', () {
testWidgets('delete item in ToDo card', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
const name = 'Card 1';
final card1 = find.text(name);
await tester.hoverOnWidget(
card1,
onHover: () async {
final moreOption = find.byType(MoreCardOptionsAccessory);
await tester.tapButton(moreOption);
},
);
await tester.tapButtonWithName(LocaleKeys.button_delete.tr());
expect(find.text(name), findsNothing);
});
testWidgets('duplicate item in ToDo card', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
const name = 'Card 1';
final card1 = find.text(name);
await tester.hoverOnWidget(
card1,
onHover: () async {
final moreOption = find.byType(MoreCardOptionsAccessory);
await tester.tapButton(moreOption);
},
);
await tester.tapButtonWithName(LocaleKeys.button_duplicate.tr());
expect(find.textContaining(name, findRichText: true), findsNWidgets(2));
});
testWidgets('add new group', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
// assert number of groups
tester.assertNumberOfGroups(4);
// scroll the board horizontally to ensure add new group button appears
await tester.scrollBoardToEnd();
// assert and click on add new group button
tester.assertNewGroupTextField(false);
await tester.tapNewGroupButton();
tester.assertNewGroupTextField(true);
// enter new group name and submit
await tester.enterNewGroupName('needs design', submit: true);
// assert number of groups has increased
tester.assertNumberOfGroups(5);
// assert text field has disappeared
await tester.scrollBoardToEnd();
tester.assertNewGroupTextField(false);
// click on add new group button
await tester.tapNewGroupButton();
tester.assertNewGroupTextField(true);
// type some things
await tester.enterNewGroupName('needs planning', submit: false);
// click on clear button and assert empty contents
await tester.clearNewGroupTextField();
// press escape to cancel
await tester.sendKeyEvent(LogicalKeyboardKey.escape);
await tester.pumpAndSettle();
tester.assertNewGroupTextField(false);
// click on add new group button
await tester.tapNewGroupButton();
tester.assertNewGroupTextField(true);
// press elsewhere to cancel
await tester.tap(find.byType(AppFlowyBoard));
await tester.pumpAndSettle();
tester.assertNewGroupTextField(false);
});
});
}
@@ -0,0 +1,14 @@
import 'package:integration_test/integration_test.dart';
import 'board_row_test.dart' as board_row_test;
import 'board_add_row_test.dart' as board_add_row_test;
import 'board_group_test.dart' as board_group_test;
void startTesting() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// Board integration tests
board_row_test.main();
board_add_row_test.main();
board_group_test.main();
}
@@ -0,0 +1,281 @@
import 'package:appflowy/plugins/database/calendar/presentation/calendar_event_editor.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pbenum.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('calendar', () {
testWidgets('update calendar layout', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Calendar,
);
// open setting
await tester.tapDatabaseSettingButton();
await tester.tapDatabaseLayoutButton();
await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Board);
await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Board);
await tester.tapDatabaseSettingButton();
await tester.tapDatabaseLayoutButton();
await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Grid);
await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Grid);
await tester.pumpAndSettle();
});
testWidgets('calendar start from day setting', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create calendar view
const name = 'calendar';
await tester.createNewPageWithNameUnderParent(
name: name,
layout: ViewLayoutPB.Calendar,
);
// Open setting
await tester.tapDatabaseSettingButton();
await tester.tapCalendarLayoutSettingButton();
// select the first day of week is Monday
await tester.tapFirstDayOfWeek();
await tester.tapFirstDayOfWeekStartFromMonday();
// Open the other page and open the new calendar page again
await tester.openPage(gettingStarted);
await tester.pumpAndSettle(const Duration(milliseconds: 300));
await tester.openPage(name, layout: ViewLayoutPB.Calendar);
// Open setting again and check the start from Monday is selected
await tester.tapDatabaseSettingButton();
await tester.tapCalendarLayoutSettingButton();
await tester.tapFirstDayOfWeek();
tester.assertFirstDayOfWeekStartFromMonday();
await tester.pumpAndSettle();
});
testWidgets('creating and editing calendar events', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create the calendar view
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Calendar,
);
// Scroll until today's date cell is visible
await tester.scrollToToday();
// Hover over today's calendar cell
await tester.hoverOnTodayCalendarCell(
// Tap on create new event button
onHover: tester.tapAddCalendarEventButton,
);
// Make sure that the event editor popup is shown
tester.assertEventEditorOpen();
tester.assertNumberOfEventsInCalendar(1);
// Dismiss the event editor popup
await tester.dismissEventEditor();
// Double click on today's calendar cell to create a new event
await tester.doubleClickCalendarCell(DateTime.now());
// Make sure that the event is inserted in the cell
tester.assertNumberOfEventsInCalendar(2);
// Click on the event
await tester.openCalendarEvent(index: 0);
tester.assertEventEditorOpen();
// Change the title of the event
await tester.editEventTitle('hello world');
await tester.dismissEventEditor();
// Make sure that the event is edited
tester.assertNumberOfEventsInCalendar(1, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(2, DateTime.now());
// Click on the event
await tester.openCalendarEvent(index: 0);
tester.assertEventEditorOpen();
// Click on the open icon
await tester.openEventToRowDetailPage();
tester.assertRowDetailPageOpened();
// Duplicate the event
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDuplicateRowButton();
await tester.dismissRowDetailPage();
// Check that there are 2 events
tester.assertNumberOfEventsInCalendar(2, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(3, DateTime.now());
// Delete an event
await tester.openCalendarEvent(index: 1);
await tester.deleteEventFromEventEditor();
// Check that there is 1 event
tester.assertNumberOfEventsInCalendar(1, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(2, DateTime.now());
// Delete event from row detail page
await tester.openCalendarEvent(index: 0);
await tester.openEventToRowDetailPage();
tester.assertRowDetailPageOpened();
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDeleteRowButton();
// Check that there is 0 event
tester.assertNumberOfEventsInCalendar(0, title: 'hello world');
tester.assertNumberOfEventsOnSpecificDay(1, DateTime.now());
});
testWidgets('create and duplicate calendar event', (tester) async {
const customTitle = "EventTitleCustom";
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create the calendar view
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Calendar,
);
// Scroll until today's date cell is visible
await tester.scrollToToday();
// Hover over today's calendar cell
await tester.hoverOnTodayCalendarCell(
// Tap on create new event button
onHover: () async => tester.tapAddCalendarEventButton(),
);
// Make sure that the event editor popup is shown
tester.assertEventEditorOpen();
tester.assertNumberOfEventsInCalendar(1);
// Change the title of the event
await tester.editEventTitle(customTitle);
// Duplicate event
final duplicateBtnFinder = find
.descendant(
of: find.byType(CalendarEventEditor),
matching: find.byType(
FlowyIconButton,
),
)
.first;
await tester.tap(duplicateBtnFinder);
await tester.pumpAndSettle();
tester.assertNumberOfEventsInCalendar(2, title: customTitle);
});
testWidgets('rescheduling events', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create the calendar view
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Calendar,
);
// Create a new event on the first of this month
final today = DateTime.now();
final firstOfThisMonth = DateTime(today.year, today.month);
await tester.doubleClickCalendarCell(firstOfThisMonth);
await tester.dismissEventEditor();
// Drag and drop the event onto the next week, same day
await tester.dragDropRescheduleCalendarEvent();
// Make sure that the event has been rescheduled to the new date
final sameDayNextWeek = firstOfThisMonth.add(const Duration(days: 7));
tester.assertNumberOfEventsInCalendar(1);
tester.assertNumberOfEventsOnSpecificDay(1, sameDayNextWeek);
// Delete the event
await tester.openCalendarEvent(index: 0, date: sameDayNextWeek);
await tester.deleteEventFromEventEditor();
// Create another event on the 5th of this month
final fifthOfThisMonth = DateTime(today.year, today.month, 5);
await tester.doubleClickCalendarCell(fifthOfThisMonth);
await tester.dismissEventEditor();
// Make sure that the event is on the 4t
tester.assertNumberOfEventsOnSpecificDay(1, fifthOfThisMonth);
// Click on the event
await tester.openCalendarEvent(index: 0, date: fifthOfThisMonth);
// Open the date editor of the event
await tester.tapDateCellInRowDetailPage();
await tester.findDateEditor(findsOneWidget);
// Edit the event's date
final newDate = fifthOfThisMonth.add(const Duration(days: 1));
await tester.selectDay(content: newDate.day);
await tester.dismissCellEditor();
// Dismiss the event editor
await tester.dismissEventEditor();
// Make sure that the event is edited
tester.assertNumberOfEventsInCalendar(1);
tester.assertNumberOfEventsOnSpecificDay(1, newDate);
// Click on the unscheduled events button
await tester.openUnscheduledEventsPopup();
// Assert that nothing shows up
tester.findUnscheduledPopup(findsNothing, 0);
// Click on the event in the calendar
await tester.openCalendarEvent(index: 0, date: newDate);
// Open the date editor of the event
await tester.tapDateCellInRowDetailPage();
await tester.findDateEditor(findsOneWidget);
// Clear the date of the event
await tester.clearDate();
// Dismiss the event editor
await tester.dismissEventEditor();
tester.assertNumberOfEventsInCalendar(0);
// Click on the unscheduled events button
await tester.openUnscheduledEventsPopup();
// Assert that a popup appears and 1 unscheduled event
tester.findUnscheduledPopup(findsOneWidget, 1);
// Click on the unscheduled event
await tester.clickUnscheduledEvent();
tester.assertRowDetailPageOpened();
});
});
}
@@ -0,0 +1,547 @@
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:intl/intl.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('edit grid cell:', () {
testWidgets('text', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'hello world',
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'hello world',
);
await tester.pumpAndSettle();
});
// Make sure the text cells are filled with the right content when there are
// multiple text cell
testWidgets('multiple text cells', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(
name: 'my grid',
layout: ViewLayoutPB.Grid,
);
await tester.createField(FieldType.RichText, 'description');
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'hello',
);
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.RichText,
input: 'world',
cellIndex: 1,
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'hello',
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.RichText,
content: 'world',
cellIndex: 1,
);
await tester.pumpAndSettle();
});
testWidgets('number', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.Number;
// Create a number field
await tester.createField(fieldType, fieldType.name);
await tester.editCell(
rowIndex: 0,
fieldType: fieldType,
input: '-1',
);
// edit the next cell to force the previous cell at row 0 to lose focus
await tester.editCell(
rowIndex: 1,
fieldType: fieldType,
input: '0.2',
);
// -1 -> -1
tester.assertCellContent(
rowIndex: 0,
fieldType: fieldType,
content: '-1',
);
// edit the next cell to force the previous cell at row 1 to lose focus
await tester.editCell(
rowIndex: 2,
fieldType: fieldType,
input: '.1',
);
// 0.2 -> 0.2
tester.assertCellContent(
rowIndex: 1,
fieldType: fieldType,
content: '0.2',
);
// edit the next cell to force the previous cell at row 2 to lose focus
await tester.editCell(
rowIndex: 0,
fieldType: fieldType,
input: '',
);
// .1 -> 0.1
tester.assertCellContent(
rowIndex: 2,
fieldType: fieldType,
content: '0.1',
);
await tester.pumpAndSettle();
});
testWidgets('checkbox', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.assertCheckboxCell(rowIndex: 0, isSelected: false);
await tester.tapCheckboxCellInGrid(rowIndex: 0);
await tester.assertCheckboxCell(rowIndex: 0, isSelected: true);
await tester.tapCheckboxCellInGrid(rowIndex: 1);
await tester.tapCheckboxCellInGrid(rowIndex: 2);
await tester.assertCheckboxCell(rowIndex: 1, isSelected: true);
await tester.assertCheckboxCell(rowIndex: 2, isSelected: true);
await tester.pumpAndSettle();
});
testWidgets('created time', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.CreatedTime;
// Create a create time field
// The create time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsNothing);
await tester.pumpAndSettle();
});
testWidgets('last modified time', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.LastEditedTime;
// Create a last time field
// The last time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsNothing);
await tester.pumpAndSettle();
});
testWidgets('date time', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.DateTime;
await tester.createField(fieldType, fieldType.name);
// Tap the cell to invoke the field editor
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Toggle include time
await tester.toggleIncludeTime();
// Dismiss the cell editor
await tester.dismissCellEditor();
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Turn off include time
await tester.toggleIncludeTime();
// Select a date
final today = DateTime.now();
await tester.selectDay(content: today.day);
await tester.dismissCellEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('MMM dd, y').format(today),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
// Toggle include time
final now = DateTime.now();
await tester.toggleIncludeTime();
await tester.dismissCellEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('MMM dd, y HH:mm').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Change date format
await tester.tapChangeDateTimeFormatButton();
await tester.changeDateFormat();
await tester.dismissCellEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('dd/MM/y HH:mm').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Change time format
await tester.tapChangeDateTimeFormatButton();
await tester.changeTimeFormat();
await tester.dismissCellEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('dd/MM/y hh:mm a').format(now),
);
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findDateEditor(findsOneWidget);
// Clear the date and time
await tester.clearDate();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: '',
);
await tester.pumpAndSettle();
});
testWidgets('single select', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
const fieldType = FieldType.SingleSelect;
// When create a grid, it will create a single select field by default
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create a new select option
await tester.createOption(name: 'tag 1');
await tester.dismissCellEditor();
// Make sure the option is created and displayed in the cell
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 1',
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create another select option
await tester.createOption(name: 'tag 2');
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 2',
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsOneWidget,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// switch to first option
await tester.selectOption(name: 'tag 1');
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: 'tag 1',
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsOneWidget,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Deselect the currently-selected option
await tester.selectOption(name: 'tag 1');
await tester.dismissCellEditor();
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNothing,
);
await tester.pumpAndSettle();
});
testWidgets('multi select', (tester) async {
final tags = [
'tag 1',
'tag 2',
'tag 3',
'tag 4',
];
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.MultiSelect;
await tester.createField(fieldType, fieldType.name);
// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create a new select option
await tester.createOption(name: tags.first);
await tester.dismissCellEditor();
// Make sure the option is created and displayed in the cell
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags.first,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Create some other select options
await tester.createOption(name: tags[1]);
await tester.createOption(name: tags[2]);
await tester.createOption(name: tags[3]);
await tester.dismissCellEditor();
for (final tag in tags) {
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tag,
);
}
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNWidgets(4),
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Deselect all options
for (final tag in tags) {
await tester.selectOption(name: tag);
}
await tester.dismissCellEditor();
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNothing,
);
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
await tester.findSelectOptionEditor(findsOneWidget);
// Select some options
await tester.selectOption(name: tags[1]);
await tester.selectOption(name: tags[3]);
await tester.dismissCellEditor();
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags[1],
);
await tester.findSelectOptionWithNameInGrid(
rowIndex: 0,
name: tags[3],
);
await tester.assertNumberOfSelectedOptionsInGrid(
rowIndex: 0,
matcher: findsNWidgets(2),
);
await tester.pumpAndSettle();
});
testWidgets('checklist', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
const fieldType = FieldType.Checklist;
await tester.createField(fieldType, fieldType.name);
// assert that there is no progress bar in the grid
tester.assertChecklistCellInGrid(rowIndex: 0, percent: null);
// tap on the first checklist cell
await tester.tapChecklistCellInGrid(rowIndex: 0);
// assert that the checklist editor is shown
tester.assertChecklistEditorVisible(visible: true);
// create a new task with enter
await tester.createNewChecklistTask(name: "task 0", enter: true);
// assert that the task is displayed
tester.assertChecklistTaskInEditor(
index: 0,
name: "task 0",
isChecked: false,
);
// update the task's name
await tester.renameChecklistTask(index: 0, name: "task 1");
// assert that the task's name is updated
tester.assertChecklistTaskInEditor(
index: 0,
name: "task 1",
isChecked: false,
);
// dismiss new task editor
await tester.dismissCellEditor();
// dismiss checklist cell editor
await tester.dismissCellEditor();
// assert that progress bar is shown in grid at 0%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 0);
// start editing the first checklist cell again
await tester.tapChecklistCellInGrid(rowIndex: 0);
// create another task with the create button
await tester.createNewChecklistTask(name: "task 2", button: true);
// assert that the task was inserted
tester.assertChecklistTaskInEditor(
index: 1,
name: "task 2",
isChecked: false,
);
// mark it as complete
await tester.checkChecklistTask(index: 1);
// assert that the task was checked in the editor
tester.assertChecklistTaskInEditor(
index: 1,
name: "task 2",
isChecked: true,
);
// dismiss checklist editor
await tester.dismissCellEditor();
await tester.dismissCellEditor();
// assert that progressbar is shown in grid at 50%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 0.5);
// re-open the cell editor
await tester.tapChecklistCellInGrid(rowIndex: 0);
// hover over first task and delete it
await tester.deleteChecklistTask(index: 0);
// dismiss cell editor
await tester.dismissCellEditor();
// assert that progressbar is shown in grid at 100%
tester.assertChecklistCellInGrid(rowIndex: 0, percent: 1);
// re-open the cell edior
await tester.tapChecklistCellInGrid(rowIndex: 0);
// delete the remaining task
await tester.deleteChecklistTask(index: 0);
// dismiss the cell editor
await tester.dismissCellEditor();
// check that the progress bar is not viisble
tester.assertChecklistCellInGrid(rowIndex: 0, percent: null);
});
});
}
@@ -0,0 +1,55 @@
import 'package:appflowy/plugins/database/grid/presentation/grid_page.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('database field settings', () {
testWidgets('field visibility', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Grid);
// create a field
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField('New field 1');
await tester.dismissFieldEditor();
// hide the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapHidePropertyButton();
tester.noFieldWithName('New field 1');
// go back to inline database view, expect field to be shown
await tester.tapTabBarLinkedViewByViewName('Untitled');
tester.findFieldWithName('New field 1');
// go back to linked database view, expect field to be hidden
await tester.tapTabBarLinkedViewByViewName('Grid');
tester.noFieldWithName('New field 1');
// use the settings button to show the field
await tester.tapDatabaseSettingButton();
await tester.tapViewPropertiesButton();
await tester.tapViewTogglePropertyVisibilityButtonByName('New field 1');
await tester.dismissFieldEditor();
tester.findFieldWithName('New field 1');
// open first row in popup then hide the field
await tester.openFirstRowDetailPage();
await tester.tapGridFieldWithNameInRowDetailPage('New field 1');
await tester.tapHidePropertyButtonInFieldEditor();
await tester.dismissRowDetailPage();
tester.noFieldWithName('New field 1');
});
});
}
@@ -0,0 +1,395 @@
import 'package:appflowy/plugins/database/grid/presentation/grid_page.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/header/type_option/select/select_option.dart';
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:intl/intl.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid field editor:', () {
testWidgets('rename existing field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.tapGridFieldWithName('Name');
await tester.tapEditFieldButton();
await tester.renameField('hello world');
await tester.dismissFieldEditor();
await tester.tapGridFieldWithName('hello world');
await tester.pumpAndSettle();
});
testWidgets('update field type of existing field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.changeFieldTypeOfFieldWithName('Type', FieldType.Checkbox);
await tester.assertFieldTypeWithFieldName(
'Type',
FieldType.Checkbox,
);
await tester.pumpAndSettle();
});
testWidgets('create a field and rename it', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// create a field
await tester.createField(FieldType.Checklist, 'checklist');
// check the field is created successfully
tester.findFieldWithName('checklist');
await tester.pumpAndSettle();
});
testWidgets('delete field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// create a field
await tester.createField(FieldType.Checkbox, 'New field 1');
// Delete the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapDeletePropertyButton();
// confirm delete
await tester.tapDialogOkButton();
tester.noFieldWithName('New field 1');
await tester.pumpAndSettle();
});
testWidgets('duplicate field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// create a field
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField('New field 1');
await tester.dismissFieldEditor();
// duplicate the field
await tester.tapGridFieldWithName('New field 1');
await tester.tapDuplicatePropertyButton();
tester.findFieldWithName('New field 1 (copy)');
await tester.pumpAndSettle();
});
testWidgets('insert field on either side of a field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.scrollToRight(find.byType(GridPage));
// insert new field to the right
await tester.tapGridFieldWithName('Type');
await tester.tapInsertFieldButton(left: false, name: 'Right');
await tester.dismissFieldEditor();
tester.findFieldWithName('Right');
// insert new field to the right
await tester.tapGridFieldWithName('Type');
await tester.tapInsertFieldButton(left: true, name: "Left");
await tester.dismissFieldEditor();
tester.findFieldWithName('Left');
await tester.pumpAndSettle();
});
testWidgets('create checklist field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
// Open the type option menu
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.Checklist);
// After update the field type, the cells should be updated
await tester.findCellByFieldType(FieldType.Checklist);
await tester.pumpAndSettle();
});
testWidgets('create list of fields', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
for (final fieldType in [
FieldType.Checklist,
FieldType.DateTime,
FieldType.Number,
FieldType.URL,
FieldType.MultiSelect,
FieldType.LastEditedTime,
FieldType.CreatedTime,
FieldType.Checkbox,
]) {
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField(fieldType.name);
// Open the type option menu
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(fieldType);
await tester.dismissFieldEditor();
// After update the field type, the cells should be updated
await tester.findCellByFieldType(fieldType);
await tester.pumpAndSettle();
}
});
testWidgets('field types with empty type option editor', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
for (final fieldType in [
FieldType.RichText,
FieldType.Checkbox,
FieldType.Checklist,
FieldType.URL,
]) {
// create the field
await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
await tester.renameField(fieldType.i18n);
// change field type
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(fieldType);
await tester.dismissFieldEditor();
// open the field editor
await tester.tapGridFieldWithName(fieldType.i18n);
await tester.tapEditFieldButton();
// check type option editor is empty
tester.expectEmptyTypeOptionEditor();
await tester.dismissFieldEditor();
}
});
testWidgets('number field type option', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.scrollToRight(find.byType(GridPage));
// create a number field
await tester.tapNewPropertyButton();
await tester.renameField("Number");
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.Number);
await tester.dismissFieldEditor();
// enter some data into the first number cell
await tester.editCell(
rowIndex: 0,
fieldType: FieldType.Number,
input: '123',
);
// edit the next cell to force the previous cell at row 0 to lose focus
await tester.editCell(
rowIndex: 1,
fieldType: FieldType.Number,
input: '0.2',
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.Number,
content: '123',
);
// open editor and change number format
await tester.tapGridFieldWithName('Number');
await tester.tapEditFieldButton();
await tester.changeNumberFieldFormat();
await tester.dismissFieldEditor();
// assert number format has been changed
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.Number,
content: '\$123',
);
});
testWidgets('add option', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Grid,
);
// invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditFieldButton();
// tap 'add option' button
await tester.tapAddSelectOptionButton();
const text = 'Hello AppFlowy';
final inputField = find.descendant(
of: find.byType(CreateOptionTextField),
matching: find.byType(TextField),
);
await tester.enterText(inputField, text);
await tester.pumpAndSettle();
await tester.testTextInput.receiveAction(TextInputAction.done);
await tester.pumpAndSettle(const Duration(milliseconds: 500));
// check the result
tester.expectToSeeText(text);
});
testWidgets('date time field type options', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.scrollToRight(find.byType(GridPage));
// create a date field
await tester.tapNewPropertyButton();
await tester.renameField(FieldType.DateTime.i18n);
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.DateTime);
await tester.dismissFieldEditor();
// edit the first date cell
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.toggleIncludeTime();
final now = DateTime.now();
await tester.selectDay(content: now.day);
await tester.dismissCellEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('MMM dd, y HH:mm').format(now),
);
// open editor and change date & time format
await tester.tapGridFieldWithName(FieldType.DateTime.i18n);
await tester.tapEditFieldButton();
await tester.changeDateFormat();
await tester.changeTimeFormat();
await tester.dismissFieldEditor();
// assert date format has been changed
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.DateTime,
content: DateFormat('dd/MM/y hh:mm a').format(now),
);
});
testWidgets('last modified and created at field type options',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
final created = DateTime.now();
// create a created at field
await tester.tapNewPropertyButton();
await tester.renameField(FieldType.CreatedTime.i18n);
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.CreatedTime);
await tester.dismissFieldEditor();
// create a last modified field
await tester.tapNewPropertyButton();
await tester.renameField(FieldType.LastEditedTime.i18n);
await tester.tapSwitchFieldTypeButton();
// get time just before modifying
final modified = DateTime.now();
// create a last modified field (cont'd)
await tester.selectFieldType(FieldType.LastEditedTime);
await tester.dismissFieldEditor();
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.CreatedTime,
content: DateFormat('MMM dd, y HH:mm').format(created),
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.LastEditedTime,
content: DateFormat('MMM dd, y HH:mm').format(modified),
);
// open field editor and change date & time format
await tester.tapGridFieldWithName(FieldType.LastEditedTime.i18n);
await tester.tapEditFieldButton();
await tester.changeDateFormat();
await tester.changeTimeFormat();
await tester.dismissFieldEditor();
// open field editor and change date & time format
await tester.tapGridFieldWithName(FieldType.CreatedTime.i18n);
await tester.tapEditFieldButton();
await tester.changeDateFormat();
await tester.changeTimeFormat();
await tester.dismissFieldEditor();
// assert format has been changed
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.CreatedTime,
content: DateFormat('dd/MM/y hh:mm a').format(created),
);
tester.assertCellContent(
rowIndex: 0,
fieldType: FieldType.LastEditedTime,
content: DateFormat('dd/MM/y hh:mm a').format(modified),
);
});
});
}
@@ -1,15 +1,15 @@
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart';
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/choicechip/checkbox.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/choicechip/text.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import '../../shared/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('database filter', () {
group('grid filter:', () {
testWidgets('add text filter', (tester) async {
await tester.openV020database();
@@ -103,8 +103,8 @@ void main() {
// select the option 's4'
await tester.tapOptionFilterWithName('s4');
// The row with 's4' or 's5' should be shown.
await tester.assertNumberOfRowsInGridPage(2);
// The row with 's4' should be shown.
await tester.assertNumberOfRowsInGridPage(1);
await tester.pumpAndSettle();
});
@@ -0,0 +1,206 @@
import 'package:appflowy/workspace/presentation/notifications/widgets/notification_item.dart';
import 'package:appflowy/workspace/presentation/widgets/date_picker/widgets/reminder_selector.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('reminder in database', () {
testWidgets('add date field and add reminder', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditFieldButton();
// Change to date type
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.DateTime);
await tester.dismissFieldEditor();
// Open date picker
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Select date
final isToday = await tester.selectLastDateInPicker();
// Select "On day of event" reminder
await tester.selectReminderOption(ReminderOption.onDayOfEvent);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
// Open date picker again
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
int tabIndex = 1;
final now = DateTime.now();
if (isToday && now.hour >= 9) {
tabIndex = 0;
}
// Open "Upcoming" in Notification hub
await tester.openNotificationHub(tabIndex: tabIndex);
// Expect 1 notification
tester.expectNotificationItems(1);
});
testWidgets('navigate from reminder to open row', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditFieldButton();
// Change to date type
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.DateTime);
await tester.dismissFieldEditor();
// Open date picker
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Select date
final isToday = await tester.selectLastDateInPicker();
// Select "On day of event"-reminder
await tester.selectReminderOption(ReminderOption.onDayOfEvent);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
// Open date picker again
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
// Create and Navigate to a new document
await tester.createNewPageWithNameUnderParent();
await tester.pumpAndSettle();
int tabIndex = 1;
final now = DateTime.now();
if (isToday && now.hour >= 9) {
tabIndex = 0;
}
// Open correct tab in Notification hub
await tester.openNotificationHub(tabIndex: tabIndex);
// Expect 1 notification
tester.expectNotificationItems(1);
// Tap on the notification
await tester.tap(find.byType(NotificationItem));
await tester.pumpAndSettle();
// Expect to see Row Editor Dialog
tester.expectToSeeRowDetailsPageDialog();
});
testWidgets(
'toggle include time sets reminder option correctly',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(
layout: ViewLayoutPB.Grid,
);
// Invoke the field editor
await tester.tapGridFieldWithName('Type');
await tester.tapEditFieldButton();
// Change to date type
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(FieldType.DateTime);
await tester.dismissFieldEditor();
// Open date picker
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Select date
await tester.selectLastDateInPicker();
// Select "On day of event"-reminder
await tester.selectReminderOption(ReminderOption.onDayOfEvent);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
// Open date picker again
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
// Toggle include time on
await tester.toggleIncludeTime();
// Expect "At time of event" to be displayed
tester.expectSelectedReminder(ReminderOption.atTimeOfEvent);
// Dismiss the cell/date editor
await tester.dismissCellEditor();
// Open date picker again
await tester.tapCellInGrid(rowIndex: 0, fieldType: FieldType.DateTime);
await tester.findDateEditor(findsOneWidget);
// Expect "At time of event" to be displayed
tester.expectSelectedReminder(ReminderOption.atTimeOfEvent);
// Select "One hour before"-reminder
await tester.selectReminderOption(ReminderOption.oneHourBefore);
// Expect "One hour before" to be displayed
tester.expectSelectedReminder(ReminderOption.oneHourBefore);
// Toggle include time off
await tester.toggleIncludeTime();
// Expect "On day of event" to be displayed
tester.expectSelectedReminder(ReminderOption.onDayOfEvent);
},
);
});
}
@@ -0,0 +1,331 @@
import 'package:appflowy/plugins/database/widgets/row/row_banner.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/emoji.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid row detail page:', () {
testWidgets('opens', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Make sure that the row page is opened
tester.assertRowDetailPageOpened();
// Each row detail page should have a document
await tester.assertDocumentExistInRowDetailPage();
});
testWidgets('add emoji', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.tapEmoji('😀');
// After select the emoji, the EmojiButton will show up
await tester.tapButton(find.byType(EmojiButton));
});
testWidgets('update emoji', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.tapEmoji('😀');
// Update existing selected emoji
await tester.tapButton(find.byType(EmojiButton));
await tester.tapEmoji('😅');
// The emoji already displayed in the row banner
final emojiText = find.byWidgetPredicate(
(widget) => widget is FlowyText && widget.text == '😅',
);
// The number of emoji should be two. One in the row displayed in the grid
// one in the row detail page.
expect(emojiText, findsNWidgets(2));
});
testWidgets('remove emoji', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.hoverRowBanner();
await tester.openEmojiPicker();
await tester.tapEmoji('😀');
// Remove the emoji
await tester.tapButton(find.byType(RemoveEmojiButton));
final emojiText = find.byWidgetPredicate(
(widget) => widget is FlowyText && widget.text == '😀',
);
expect(emojiText, findsNothing);
});
testWidgets('create list of fields', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
for (final fieldType in [
FieldType.Checklist,
FieldType.DateTime,
FieldType.Number,
FieldType.URL,
FieldType.MultiSelect,
FieldType.LastEditedTime,
FieldType.CreatedTime,
FieldType.Checkbox,
]) {
await tester.tapRowDetailPageCreatePropertyButton();
await tester.renameField(fieldType.name);
// Open the type option menu
await tester.tapSwitchFieldTypeButton();
await tester.selectFieldType(fieldType);
// After update the field type, the cells should be updated
await tester.findCellByFieldType(fieldType);
await tester.scrollRowDetailByOffset(const Offset(0, -50));
}
});
testWidgets('change order of fields and cells', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Assert that the first field in the row details page is the select
// option type
tester.assertFirstFieldInRowDetailByType(FieldType.SingleSelect);
// Reorder first field in list
final gesture = await tester.hoverOnFieldInRowDetail(index: 0);
await tester.pumpAndSettle();
await tester.reorderFieldInRowDetail(offset: 30);
// Orders changed, now the checkbox is first
tester.assertFirstFieldInRowDetailByType(FieldType.Checkbox);
await gesture.removePointer();
await tester.pumpAndSettle();
// Reorder second field in list
await tester.hoverOnFieldInRowDetail(index: 1);
await tester.pumpAndSettle();
await tester.reorderFieldInRowDetail(offset: -30);
// First field is now back to select option
tester.assertFirstFieldInRowDetailByType(FieldType.SingleSelect);
});
testWidgets('hide and show hidden fields', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Assert that the show hidden fields button isn't visible
tester.assertToggleShowHiddenFieldsVisibility(false);
// Hide the first field in the field list
await tester.tapGridFieldWithNameInRowDetailPage("Type");
await tester.tapHidePropertyButtonInFieldEditor();
// Assert that the field is now hidden
tester.noFieldWithName("Type");
// Assert that the show hidden fields button appears
tester.assertToggleShowHiddenFieldsVisibility(true);
// Click on the show hidden fields button
await tester.toggleShowHiddenFields();
// Assert that the hidden field is shown again and that the show
// hidden fields button is still present
tester.findFieldWithName("Type");
tester.assertToggleShowHiddenFieldsVisibility(true);
// Click hide hidden fields
await tester.toggleShowHiddenFields();
// Assert that the hidden field has vanished
tester.noFieldWithName("Type");
// Click show hidden fields
await tester.toggleShowHiddenFields();
// delete the hidden field
await tester.tapGridFieldWithNameInRowDetailPage("Type");
await tester.tapDeletePropertyInFieldEditor();
// Assert that the that the show hidden fields button is gone
tester.assertToggleShowHiddenFieldsVisibility(false);
});
testWidgets('update the contents of the document and re-open it',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Wait for the document to be loaded
await tester.wait(500);
// Focus on the editor
final textBlock = find.byType(ParagraphBlockComponentWidget);
await tester.tapAt(tester.getCenter(textBlock));
await tester.pumpAndSettle();
// Input some text
const inputText = 'Hello World';
await tester.ime.insertText(inputText);
expect(
find.textContaining(inputText, findRichText: true),
findsOneWidget,
);
// Tap outside to dismiss the field
await tester.tapAt(Offset.zero);
await tester.pumpAndSettle();
// Re-open the document
await tester.openFirstRowDetailPage();
expect(
find.textContaining(inputText, findRichText: true),
findsOneWidget,
);
});
testWidgets(
'check if the title wraps properly when a long text is inserted',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
// Wait for the document to be loaded
await tester.wait(500);
// Focus on the editor
final textField = find
.descendant(
of: find.byType(SimpleDialog),
matching: find.byType(TextField),
)
.first;
// Input a long text
await tester.enterText(textField, 'Long text' * 25);
await tester.pumpAndSettle();
// Tap outside to dismiss the field
await tester.tapAt(Offset.zero);
await tester.pumpAndSettle();
// Check if there is any overflow in the widget tree
expect(tester.takeException(), isNull);
// Re-open the document
await tester.openFirstRowDetailPage();
// Check again if there is any overflow in the widget tree
expect(tester.takeException(), isNull);
});
testWidgets('delete row', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDeleteRowButton();
await tester.tapEscButton();
await tester.assertNumberOfRowsInGridPage(2);
});
testWidgets('duplicate row', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// Create a new grid
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
await tester.tapRowDetailPageRowActionButton();
await tester.tapRowDetailPageDuplicateRowButton();
await tester.tapEscButton();
await tester.assertNumberOfRowsInGridPage(4);
});
});
}
@@ -0,0 +1,65 @@
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid', () {
testWidgets('create row of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.tapCreateRowButtonInGrid();
// 3 initial rows + 1 created
await tester.assertNumberOfRowsInGridPage(4);
await tester.pumpAndSettle();
});
testWidgets('create row from row menu of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.hoverOnFirstRowOfGrid();
await tester.tapCreateRowButtonInRowMenuOfGrid();
// 3 initial rows + 1 created
await tester.assertNumberOfRowsInGridPage(4);
await tester.pumpAndSettle();
});
testWidgets('delete row of the grid', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.hoverOnFirstRowOfGrid();
// Open the row menu and then click the delete
await tester.tapRowMenuButtonInGrid();
await tester.tapDeleteOnRowMenu();
// 3 initial rows - 1 deleted
await tester.assertNumberOfRowsInGridPage(2);
await tester.pumpAndSettle();
});
testWidgets('check number of row indicator in the initial grid',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
await tester.pumpAndSettle();
});
});
}
@@ -1,10 +1,10 @@
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import 'util/util.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -14,7 +14,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// open setting
await tester.tapDatabaseSettingButton();
@@ -31,7 +31,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// open setting
await tester.tapDatabaseSettingButton();
@@ -2,7 +2,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/database_test_op.dart';
import '../../shared/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -16,7 +16,7 @@ void main() {
// check the text cell
final textCells = <String>['A', 'B', 'C', 'D', 'E', '', '', '', '', ''];
for (final (index, content) in textCells.indexed) {
await tester.assertCellContent(
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
@@ -34,7 +34,7 @@ void main() {
false,
false,
false,
false
false,
];
for (final (index, content) in checkboxCells.indexed) {
await tester.assertCheckboxCell(
@@ -54,10 +54,10 @@ void main() {
'10',
'11',
'12',
''
'',
];
for (final (index, content) in numberCells.indexed) {
await tester.assertCellContent(
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
@@ -74,7 +74,7 @@ void main() {
'',
];
for (final (index, content) in urlCells.indexed) {
await tester.assertCellContent(
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.URL,
content: content,
@@ -135,7 +135,7 @@ void main() {
null,
];
for (final (index, percent) in checklistCells.indexed) {
await tester.assertChecklistCellInGrid(
tester.assertChecklistCellInGrid(
rowIndex: index,
percent: percent,
);
@@ -152,11 +152,12 @@ void main() {
'Jun 16, 2023',
'',
'',
''
'',
];
for (final (index, content) in dateCells.indexed) {
await tester.assertDateCellInGrid(
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.DateTime,
content: content,
);
}
@@ -0,0 +1,374 @@
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('grid', () {
testWidgets('add text sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.RichText, 'Name');
// check the text cell order
final textCells = <String>[
'A',
'B',
'C',
'D',
'E',
'',
'',
'',
'',
'',
];
for (final (index, content) in textCells.indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Name');
await tester.tapSortByDescending();
for (final (index, content) in <String>[
'E',
'D',
'C',
'B',
'A',
'',
'',
'',
'',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
// delete all sorts
await tester.tapSortMenuInSettingBar();
await tester.tapAllSortButton();
// check the text cell order
for (final (index, content) in <String>[
'A',
'B',
'C',
'D',
'E',
'',
'',
'',
'',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.RichText,
content: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add checkbox sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Checkbox, 'Done');
// check the checkbox cell order
for (final (index, content) in <bool>[
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Done');
await tester.tapSortByDescending();
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add number sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Number, 'number');
// check the number cell order
for (final (index, content) in <String>[
'-2',
'-1',
'0.1',
'0.2',
'1',
'2',
'10',
'11',
'12',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
// open the sort menu and select order by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('number');
await tester.tapSortByDescending();
for (final (index, content) in <String>[
'12',
'11',
'10',
'2',
'1',
'0.2',
'0.1',
'-1',
'-2',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('add checkbox and number sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Checkbox, 'Done');
// open the sort menu and sort checkbox by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Done');
await tester.tapSortByDescending();
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// add another sort, this time by number descending
await tester.tapSortMenuInSettingBar();
await tester.tapCreateSortByFieldTypeInSortMenu(
FieldType.Number,
'number',
);
await tester.tapSortButtonByName('number');
await tester.tapSortByDescending();
// check checkbox cell order
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// check number cell order
for (final (index, content) in <String>[
'1',
'0.2',
'0.1',
'-1',
'-2',
'12',
'11',
'10',
'2',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
await tester.pumpAndSettle();
});
testWidgets('reorder sort', (tester) async {
await tester.openV020database();
// create a sort
await tester.tapDatabaseSortButton();
await tester.tapCreateSortByFieldType(FieldType.Checkbox, 'Done');
// open the sort menu and sort checkbox by descending
await tester.tapSortMenuInSettingBar();
await tester.tapSortButtonByName('Done');
await tester.tapSortByDescending();
// add another sort, this time by number descending
await tester.tapSortMenuInSettingBar();
await tester.tapCreateSortByFieldTypeInSortMenu(
FieldType.Number,
'number',
);
await tester.tapSortButtonByName('number');
await tester.tapSortByDescending();
// check checkbox cell order
for (final (index, content) in <bool>[
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// check number cell order
for (final (index, content) in <String>[
'1',
'0.2',
'0.1',
'-1',
'-2',
'12',
'11',
'10',
'2',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
// reorder sort
await tester.tapSortMenuInSettingBar();
await tester.reorderSort(
(FieldType.Number, 'number'),
(FieldType.Checkbox, 'Done'),
);
// check checkbox cell order
for (final (index, content) in <bool>[
false,
false,
false,
false,
true,
true,
true,
true,
true,
false,
].indexed) {
await tester.assertCheckboxCell(
rowIndex: index,
isSelected: content,
);
}
// check the number cell order
for (final (index, content) in <String>[
'12',
'11',
'10',
'2',
'1',
'0.2',
'0.1',
'-1',
'-2',
'',
].indexed) {
tester.assertCellContent(
rowIndex: index,
fieldType: FieldType.Number,
content: content,
);
}
});
});
}
@@ -0,0 +1,77 @@
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/database_test_op.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('database', () {
testWidgets('create linked view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// Create grid view
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Grid);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Grid);
// Create calendar view
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Calendar);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Calendar);
await tester.pumpAndSettle();
});
testWidgets('rename and delete linked view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// rename board view
await tester.renameLinkedView(
tester.findTabBarLinkViewByViewLayout(ViewLayoutPB.Board),
'new board',
);
final findBoard = tester.findTabBarLinkViewByViewName('new board');
expect(findBoard, findsOneWidget);
// delete the board
await tester.deleteDatebaseView(findBoard);
expect(tester.findTabBarLinkViewByViewName('new board'), findsNothing);
await tester.pumpAndSettle();
});
testWidgets('delete the last database view', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
// Create board view
await tester.tapCreateLinkedDatabaseViewButton(DatabaseLayoutPB.Board);
tester.assertCurrentDatabaseTagIs(DatabaseLayoutPB.Board);
// delete the board
await tester.deleteDatebaseView(
tester.findTabBarLinkViewByViewLayout(ViewLayoutPB.Board),
);
await tester.pumpAndSettle();
});
});
}
@@ -0,0 +1,95 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/keyboard.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('document alignment', () {
testWidgets('edit alignment in toolbar', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
final selection = Selection.single(
path: [0],
startOffset: 0,
endOffset: 1,
);
// click the first line of the readme
await tester.editor.tapLineOfEditorAt(0);
await tester.editor.updateSelection(selection);
await tester.pumpAndSettle();
// click the align center
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_left_s);
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_center_s);
// expect to see the align center
final editorState = tester.editor.getCurrentEditorState();
final first = editorState.getNodeAtPath([0])!;
expect(first.attributes[blockComponentAlign], 'center');
// click the align right
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_center_s);
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_right_s);
expect(first.attributes[blockComponentAlign], 'right');
// click the align left
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_right_s);
await tester.tapButtonWithFlowySvgData(FlowySvgs.toolbar_align_left_s);
expect(first.attributes[blockComponentAlign], 'left');
});
testWidgets('edit alignment using shortcut', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
// click the first line of the readme
await tester.editor.tapLineOfEditorAt(0);
await tester.pumpAndSettle();
final editorState = tester.editor.getCurrentEditorState();
final first = editorState.getNodeAtPath([0])!;
// expect to see text aligned to the right
await FlowyTestKeyboard.simulateKeyDownEvent(
[
LogicalKeyboardKey.control,
LogicalKeyboardKey.shift,
LogicalKeyboardKey.keyR,
],
tester: tester,
);
expect(first.attributes[blockComponentAlign], rightAlignmentKey);
// expect to see text aligned to the center
await FlowyTestKeyboard.simulateKeyDownEvent(
[
LogicalKeyboardKey.control,
LogicalKeyboardKey.shift,
LogicalKeyboardKey.keyE,
],
tester: tester,
);
expect(first.attributes[blockComponentAlign], centerAlignmentKey);
// expect to see text aligned to the left
await FlowyTestKeyboard.simulateKeyDownEvent(
[
LogicalKeyboardKey.control,
LogicalKeyboardKey.shift,
LogicalKeyboardKey.keyL,
],
tester: tester,
);
expect(first.attributes[blockComponentAlign], leftAlignmentKey);
});
});
}
@@ -7,7 +7,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -18,7 +18,7 @@ void main() {
await tester.tapGoButton();
// create a new document
await tester.createNewPageWithName();
await tester.createNewPageWithNameUnderParent();
// mock the clipboard
const lines = 3;
@@ -3,11 +3,12 @@ import 'dart:io';
import 'package:appflowy/plugins/document/presentation/editor_plugins/copy_and_paste/clipboard_service.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -219,7 +220,7 @@ void main() {
expect(node.delta!.toJson(), [
{
'insert': text,
'attributes': {'href': url}
'attributes': {'href': url},
}
]);
},
@@ -276,6 +277,22 @@ void main() {
},
);
});
testWidgets(
'auto convert url to link preview block',
(widgetTester) async {
const url = 'https://appflowy.io';
await widgetTester.pasteContent(
plainText: url,
(editorState) {
expect(editorState.document.root.children.length, 2);
final node = editorState.getNodeAtPath([0])!;
expect(node.type, LinkPreviewBlockKeys.type);
expect(node.attributes[LinkPreviewBlockKeys.url], url);
},
);
},
);
}
extension on WidgetTester {
@@ -290,7 +307,7 @@ extension on WidgetTester {
await tapGoButton();
// create a new document
await createNewPageWithName();
await createNewPageWithNameUnderParent();
await beforeTest?.call(editor.getCurrentEditorState());
@@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -17,14 +17,14 @@ void main() {
await tester.tapGoButton();
// create a new document
await tester.createNewPageWithName();
await tester.createNewPageWithNameUnderParent();
// expect to see a new document
tester.expectToSeePageName(
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
);
// and with one paragraph block
expect(find.byType(TextBlockComponentWidget), findsOneWidget);
expect(find.byType(ParagraphBlockComponentWidget), findsOneWidget);
});
testWidgets('delete the readme page and restore it', (tester) async {
@@ -35,7 +35,7 @@ void main() {
// delete the readme page
await tester.hoverOnPageName(
gettingStarted,
onHover: () async => await tester.tapDeletePageButton(),
onHover: () async => tester.tapDeletePageButton(),
);
// the banner should show up and the readme page should be gone
@@ -59,7 +59,7 @@ void main() {
// delete the readme page
await tester.hoverOnPageName(
gettingStarted,
onHover: () async => await tester.tapDeletePageButton(),
onHover: () async => tester.tapDeletePageButton(),
);
// the banner should show up and the readme page should be gone
@@ -0,0 +1,134 @@
import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_page_block.dart';
import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart';
import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/keyboard.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('insert inline document reference', () {
testWidgets('insert by slash menu', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
final name = await createDocumentToReference(tester);
await tester.editor.tapLineOfEditorAt(0);
await tester.pumpAndSettle();
await triggerReferenceDocumentBySlashMenu(tester);
// Search for prefix of document
await enterDocumentText(tester);
// Select result
final optionFinder = find.descendant(
of: find.byType(InlineActionsHandler),
matching: find.text(name),
);
await tester.tap(optionFinder);
await tester.pumpAndSettle();
final mentionBlock = find.byType(MentionPageBlock);
expect(mentionBlock, findsOneWidget);
});
testWidgets('insert by `[[` character shortcut', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
final name = await createDocumentToReference(tester);
await tester.editor.tapLineOfEditorAt(0);
await tester.pumpAndSettle();
await tester.ime.insertText('[[');
await tester.pumpAndSettle();
// Select result
await tester.editor.tapAtMenuItemWithName(name);
await tester.pumpAndSettle();
final mentionBlock = find.byType(MentionPageBlock);
expect(mentionBlock, findsOneWidget);
});
testWidgets('insert by `+` character shortcut', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
final name = await createDocumentToReference(tester);
await tester.editor.tapLineOfEditorAt(0);
await tester.pumpAndSettle();
await tester.ime.insertText('+');
await tester.pumpAndSettle();
// Select result
await tester.editor.tapAtMenuItemWithName(name);
await tester.pumpAndSettle();
final mentionBlock = find.byType(MentionPageBlock);
expect(mentionBlock, findsOneWidget);
});
});
}
Future<String> createDocumentToReference(WidgetTester tester) async {
final name = 'document_${uuid()}';
await tester.createNewPageWithNameUnderParent(
name: name,
openAfterCreated: false,
);
// This is a workaround since the openAfterCreated
// option does not work in createNewPageWithName method
await tester.tap(find.byType(SingleInnerViewItem).first);
await tester.pumpAndSettle();
return name;
}
Future<void> triggerReferenceDocumentBySlashMenu(WidgetTester tester) async {
await tester.editor.showSlashMenu();
await tester.pumpAndSettle();
// Search for referenced document action
await enterDocumentText(tester);
// Select item
await FlowyTestKeyboard.simulateKeyDownEvent(
[
LogicalKeyboardKey.enter,
],
tester: tester,
);
await tester.pumpAndSettle();
}
Future<void> enterDocumentText(WidgetTester tester) async {
await FlowyTestKeyboard.simulateKeyDownEvent(
[
LogicalKeyboardKey.keyD,
LogicalKeyboardKey.keyO,
LogicalKeyboardKey.keyC,
LogicalKeyboardKey.keyU,
LogicalKeyboardKey.keyM,
LogicalKeyboardKey.keyE,
LogicalKeyboardKey.keyN,
LogicalKeyboardKey.keyT,
],
tester: tester,
);
await tester.pumpAndSettle();
}
@@ -0,0 +1,44 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// +, ... button beside the block component.
group('document with option action button', () {
testWidgets(
'click + to add a block after current selection, and click + and option key to add a block before current selection',
(tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
var editorState = tester.editor.getCurrentEditorState();
expect(editorState.getNodeAtPath([1])?.delta?.toPlainText(), isNotEmpty);
// add a new block after the current selection
await tester.editor.hoverAndClickOptionAddButton([0], false);
// await tester.pumpAndSettle();
expect(editorState.getNodeAtPath([1])?.delta?.toPlainText(), isEmpty);
// cancel the selection menu
await tester.tapAt(Offset.zero);
await tester.editor.hoverAndClickOptionAddButton([0], true);
await tester.pumpAndSettle();
expect(editorState.getNodeAtPath([0])?.delta?.toPlainText(), isEmpty);
// cancel the selection menu
await tester.tapAt(Offset.zero);
await tester.tapAt(Offset.zero);
await tester.createNewPageWithNameUnderParent(name: 'test');
await tester.openPage(gettingStarted);
// check the status again
editorState = tester.editor.getCurrentEditorState();
expect(editorState.getNodeAtPath([0])?.delta?.toPlainText(), isEmpty);
expect(editorState.getNodeAtPath([2])?.delta?.toPlainText(), isEmpty);
});
});
}
@@ -5,14 +5,19 @@ import 'document_codeblock_paste_test.dart' as document_codeblock_paste_test;
import 'document_copy_and_paste_test.dart' as document_copy_and_paste_test;
import 'document_create_and_delete_test.dart'
as document_create_and_delete_test;
import 'document_option_action_test.dart' as document_option_action_test;
import 'document_text_direction_test.dart' as document_text_direction_test;
import 'document_with_cover_image_test.dart' as document_with_cover_image_test;
import 'document_with_database_test.dart' as document_with_database_test;
import 'document_with_image_block_test.dart' as document_with_image_block_test;
import 'document_with_inline_math_equation_test.dart'
as document_with_inline_math_equation_test;
import 'document_with_inline_page_test.dart' as document_with_inline_page_test;
import 'document_with_outline_block_test.dart' as document_with_outline_block;
import 'document_with_toggle_list_test.dart' as document_with_toggle_list_test;
import 'edit_document_test.dart' as document_edit_test;
import 'document_inline_page_reference_test.dart'
as document_inline_page_reference_test;
void startTesting() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -29,4 +34,8 @@ void startTesting() {
document_copy_and_paste_test.main();
document_codeblock_paste_test.main();
document_alignment_test.main();
document_text_direction_test.main();
document_option_action_test.main();
document_with_image_block_test.main();
document_inline_page_reference_test.main();
}
@@ -0,0 +1,57 @@
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('text direction', () {
testWidgets(
'''no text direction items will be displayed in the default/LTR mode, and three text direction items will be displayed when toggle is enabled.''',
(tester) async {
// combine the two tests into one to avoid the time-consuming process of initializing the app
await tester.initializeAppFlowy();
await tester.tapGoButton();
final selection = Selection.single(
path: [0],
startOffset: 0,
endOffset: 1,
);
// click the first line of the readme
await tester.editor.tapLineOfEditorAt(0);
await tester.editor.updateSelection(selection);
await tester.pumpAndSettle();
// because this icons are defined in the appflowy_editor package, we can't fetch the icons by SVG data. [textDirectionItems]
final textDirectionIconNames = [
'toolbar/text_direction_auto',
'toolbar/text_direction_ltr',
'toolbar/text_direction_rtl',
];
// no text direction items by default
var button = find.byWidgetPredicate(
(widget) =>
widget is SVGIconItemWidget &&
textDirectionIconNames.contains(widget.iconName),
);
expect(button, findsNothing);
// switch to the RTL mode
await tester.toggleEnableRTLToolbarItems();
await tester.editor.tapLineOfEditorAt(0);
await tester.editor.updateSelection(selection);
await tester.pumpAndSettle();
button = find.byWidgetPredicate(
(widget) =>
widget is SVGIconItemWidget &&
textDirectionIconNames.contains(widget.iconName),
);
expect(button, findsNWidgets(3));
});
});
}
@@ -0,0 +1,154 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../../shared/emoji.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('cover image', () {
testWidgets('document cover tests', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
tester.expectToSeeNoDocumentCover();
// Hover over cover toolbar to show 'Add Cover' and 'Add Icon' buttons
await tester.editor.hoverOnCoverToolbar();
// Insert a document cover
await tester.editor.tapOnAddCover();
tester.expectToSeeDocumentCover(CoverType.asset);
// Hover over the cover to show the 'Change Cover' and delete buttons
await tester.editor.hoverOnCover();
tester.expectChangeCoverAndDeleteButton();
// Change cover to a solid color background
await tester.editor.tapOnChangeCover();
await tester.editor.switchSolidColorBackground();
await tester.editor.dismissCoverPicker();
tester.expectToSeeDocumentCover(CoverType.color);
// Change cover to a network image
const imageUrl =
"https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy/main/frontend/appflowy_flutter/assets/images/appflowy_launch_splash.jpg";
await tester.editor.hoverOnCover();
await tester.editor.tapOnChangeCover();
await tester.editor.addNetworkImageCover(imageUrl);
tester.expectToSeeDocumentCover(CoverType.file);
// Remove the cover
await tester.editor.hoverOnCover();
await tester.editor.tapOnRemoveCover();
tester.expectToSeeNoDocumentCover();
});
testWidgets('document icon tests', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
tester.expectToSeeDocumentIcon('⭐️');
// Insert a document icon
await tester.editor.tapGettingStartedIcon();
await tester.tapEmoji('😀');
tester.expectToSeeDocumentIcon('😀');
// Remove the document icon from the cover toolbar
await tester.editor.hoverOnCoverToolbar();
await tester.editor.tapRemoveIconButton();
tester.expectToSeeDocumentIcon(null);
// Add the icon back for further testing
await tester.editor.hoverOnCoverToolbar();
await tester.editor.tapAddIconButton();
await tester.tapEmoji('😀');
tester.expectToSeeDocumentIcon('😀');
// Change the document icon
await tester.editor.tapOnIconWidget();
await tester.tapEmoji('😅');
tester.expectToSeeDocumentIcon('😅');
// Remove the document icon from the icon picker
await tester.editor.tapOnIconWidget();
await tester.editor.tapRemoveIconButton(isInPicker: true);
tester.expectToSeeDocumentIcon(null);
});
testWidgets('icon and cover at the same time', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
tester.expectToSeeDocumentIcon('⭐️');
tester.expectToSeeNoDocumentCover();
// Insert a document icon
await tester.editor.tapGettingStartedIcon();
await tester.tapEmoji('😀');
// Insert a document cover
await tester.editor.hoverOnCoverToolbar();
await tester.editor.tapOnAddCover();
// Expect to see the icon and cover at the same time
tester.expectToSeeDocumentIcon('😀');
tester.expectToSeeDocumentCover(CoverType.asset);
// Hover over the cover toolbar and see that neither icons are shown
await tester.editor.hoverOnCoverToolbar();
tester.expectToSeeEmptyDocumentHeaderToolbar();
});
testWidgets('shuffle icon', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.editor.tapGettingStartedIcon();
// click the shuffle button
await tester.tapButton(
find.byTooltip(LocaleKeys.emoji_random.tr()),
);
tester.expectDocumentIconNotNull();
});
testWidgets('change skin tone', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.editor.tapGettingStartedIcon();
final searchEmojiTextField = find.byWidgetPredicate(
(widget) =>
widget is TextField &&
widget.decoration!.hintText == LocaleKeys.emoji_search.tr(),
);
await tester.enterText(
searchEmojiTextField,
'hand',
);
// change skin tone
await tester.editor.changeEmojiSkinTone(EmojiSkinTone.dark);
// select an icon with skin tone
const hand = '👋🏿';
await tester.tapEmoji(hand);
tester.expectToSeeDocumentIcon(hand);
tester.expectViewHasIcon(
gettingStarted,
ViewLayoutPB.Document,
hand,
);
});
});
}
@@ -1,17 +1,18 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database_view/board/presentation/board_page.dart';
import 'package:appflowy/plugins/database_view/calendar/presentation/calendar_page.dart';
import 'package:appflowy/plugins/database_view/grid/presentation/grid_page.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/base/link_to_page_widget.dart';
import 'package:appflowy/plugins/database/board/presentation/board_page.dart';
import 'package:appflowy/plugins/database/calendar/presentation/calendar_page.dart';
import 'package:appflowy/plugins/database/grid/presentation/grid_page.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_skeleton/text.dart';
import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart';
import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/protobuf.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import '../util/util.dart';
import '../../shared/util.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -31,6 +32,18 @@ void main() {
),
findsOneWidget,
);
// https://github.com/AppFlowy-IO/AppFlowy/issues/3533
// test: the selection of editor should be clear when editing the grid
await tester.editor.updateSelection(
Selection.collapsed(
Position(path: [1]),
),
);
final gridTextCell = find.byType(EditableTextCell).first;
await tester.tapButton(gridTextCell);
expect(tester.editor.getCurrentEditorState().selection, isNull);
});
testWidgets('insert a referenced board', (tester) async {
@@ -71,7 +84,7 @@ void main() {
await createInlineDatabase(tester, ViewLayoutPB.Grid);
// validate the referenced grid is inserted
// validate the inline grid is created
expect(
find.descendant(
of: find.byType(AppFlowyEditor),
@@ -87,7 +100,7 @@ void main() {
await createInlineDatabase(tester, ViewLayoutPB.Board);
// validate the referenced grid is inserted
// validate the inline board is created
expect(
find.descendant(
of: find.byType(AppFlowyEditor),
@@ -103,7 +116,7 @@ void main() {
await createInlineDatabase(tester, ViewLayoutPB.Calendar);
// validate the referenced grid is inserted
// validate the inline calendar is created
expect(
find.descendant(
of: find.byType(AppFlowyEditor),
@@ -123,16 +136,14 @@ Future<void> insertReferenceDatabase(
// create a new grid
final id = uuid();
final name = '${layout.name}_$id';
await tester.createNewPageWithName(
await tester.createNewPageWithNameUnderParent(
name: name,
layout: layout,
openAfterCreated: false,
);
// create a new document
await tester.createNewPageWithName(
await tester.createNewPageWithNameUnderParent(
name: 'insert_a_reference_${layout.name}',
layout: ViewLayoutPB.Document,
openAfterCreated: true,
);
// tap the first line of the document
await tester.editor.tapLineOfEditorAt(0);
@@ -142,7 +153,7 @@ Future<void> insertReferenceDatabase(
layout.referencedMenuName,
);
final linkToPageMenu = find.byType(LinkToPageMenu);
final linkToPageMenu = find.byType(InlineActionsHandler);
expect(linkToPageMenu, findsOneWidget);
final referencedDatabase = find.descendant(
of: linkToPageMenu,
@@ -158,10 +169,8 @@ Future<void> createInlineDatabase(
) async {
// create a new document
final documentName = 'insert_a_inline_${layout.name}';
await tester.createNewPageWithName(
await tester.createNewPageWithNameUnderParent(
name: documentName,
layout: ViewLayoutPB.Document,
openAfterCreated: true,
);
// tap the first line of the document
await tester.editor.tapLineOfEditorAt(0);
Loaded 100 of 3595 files, more files were not shown because too many files have changed in this diff. Show more