From 07c5ee1f01983af341a3a76ec82d9caa5be6c892 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Fri, 13 Jan 2023 16:11:43 +0100 Subject: [PATCH 1/7] fix: Require shiny.react >= 3.0.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 35f9e1d5..022a99be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,7 +23,7 @@ Imports: jsonlite, rlang, shiny, - shiny.react (>= 0.2.2) + shiny.react (>= 0.3.0) Suggests: dplyr, DT, From a89c8feaf5a79dd5c30deb221d02f5a5b1c6ed23 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Thu, 12 Jan 2023 16:02:12 +0100 Subject: [PATCH 2/7] docs: Update issue and pull request templates --- .github/.gitignore | 1 - .github/ISSUE_TEMPLATE/bug.yml | 35 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 35 --------------------- .github/ISSUE_TEMPLATE/config.yml | 8 +++++ .github/ISSUE_TEMPLATE/feature.yml | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 15 --------- .github/ISSUE_TEMPLATE/question.md | 6 ---- .github/PULL_REQUEST_TEMPLATE.md | 4 +++ .github/pull_request_template.md | 14 --------- 9 files changed, 85 insertions(+), 71 deletions(-) delete mode 100644 .github/.gitignore create mode 100644 .github/ISSUE_TEMPLATE/bug.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/pull_request_template.md diff --git a/.github/.gitignore b/.github/.gitignore deleted file mode 100644 index 2d19fc76..00000000 --- a/.github/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.html diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 00000000..928eb19f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,35 @@ +name: Bug report +description: Report a problem you encountered +body: + - type: markdown + attributes: + value: > + Thank you for taking the time to complete this bug report! + Please [search](https://github.com/Appsilon/shiny.fluent/issues) + through existing issues first to make sure you are not creating a duplicate. + + - type: textarea + attributes: + label: Steps to reproduce + value: '1. ' + validations: + required: true + + - type: textarea + attributes: + label: Bug description + description: What happened? Attach error messages and screenshots if applicable. + validations: + required: true + + - type: textarea + attributes: + label: Expected behavior + description: What should have happened? + validations: + required: true + + - type: textarea + attributes: + label: Comments + description: Add any other useful information here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 83e25643..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name : Bug report -about : Report a bug in shiny.fluent. -labels: bug ---- - - - -Add a short problem description here. - -## Example application or steps to reproduce the problem - -Add a minimal example that shows the issue (we recommend using the https://reprex.tidyverse.org/ package). - -```r - -``` - -### Expected behavior - -Describe what you would expect in this scenario. - -### Actual behavior - -Describe what happens instead. - -## Additional info - -Place for any additional details that you would like to include. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..08b36647 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://appsilon.github.io/shiny.fluent/ + about: Learn about shiny.fluent from our documentation + - name: Discussions + url: https://github.com/Appsilon/shiny.fluent/discussions + about: Use the board for questions and general discussion diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 00000000..39fa4a95 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,38 @@ +name: Feature request +description: Request a new feature +body: + - type: markdown + attributes: + value: > + Thank you for taking the time to complete this feature request! + Please [search](https://github.com/Appsilon/shiny.fluent/issues) + through existing issues first to make sure you are not creating a duplicate. + + - type: textarea + attributes: + label: Motivation + description: What is your need? What problem are you trying to solve? + validations: + required: true + + - type: textarea + attributes: + label: Feature description + description: How would this feature work from user's perspective? + validations: + required: true + + - type: textarea + attributes: + label: Implementation ideas + description: How would this feature work under the hood? + + - type: textarea + attributes: + label: Impact + description: How often would this feature be used? What if we don't implement it? + + - type: textarea + attributes: + label: Comments + description: Add any other useful information here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 01fa0879..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name : Feature request -about : Request a new feature. -labels: 'feature request' ---- - - diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 33b0f13b..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -name : Ask a Question -about : The issue tracker is not for questions -- please ask questions at https://github.com/Appsilon/shiny.fluent/discussions ---- - -The issue tracker is not for questions. If you have a question or provide general feedback, we'd love to hear it and help! Please go to https://github.com/Appsilon/shiny.fluent/discussions and write it there. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..5a138c08 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,4 @@ +### Changes +Closes # + +### How to test diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index c951db13..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,14 +0,0 @@ -Fixes # . - -Changes proposed in this pull request: -- . -- . - -# Screenshots - - - -# PR checklist - -- [ ] Unit tests added -- [ ] Documentation updated From ac3192e7672214ef53429920ad66dd74dc25a00a Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Fri, 13 Jan 2023 16:20:49 +0100 Subject: [PATCH 3/7] docs: Update header, footer and install instructions in README --- README.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d331c8da..44ca263d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -We are hiring! - - - +# shiny.fluent shiny.fluent logo -# shiny.fluent +> _Microsoft Fluent UI for Shiny Apps_ +[![CRAN +status](https://www.r-pkg.org/badges/version/shiny.fluent)](https://cran.r-project.org/package=shiny.fluent) [![CI](https://github.com/Appsilon/shiny.fluent/actions/workflows/ci.yml/badge.svg)](https://github.com/Appsilon/shiny.fluent/actions/workflows/ci.yml) +[![downloads monthly](https://cranlogs.r-pkg.org/badges/shiny.fluent)](https://CRAN.R-project.org/package=shiny.fluent) +[![downloads total](https://cranlogs.r-pkg.org/badges/grand-total/shiny.fluent)](https://CRAN.R-project.org/package=shiny.fluent) We believe that a great UI plays a huge role in the success of application projects. shiny.fluent gives your apps: @@ -27,9 +28,13 @@ As Fluent UI is built in React, shiny.fluent is based on another package called ### Installation -To install the packages, run: -```R -remotes::install_github("Appsilon/shiny.react") +Stable version: +```r +install.packages("shiny.fluent") +``` + +Development version: +```r remotes::install_github("Appsilon/shiny.fluent") ``` @@ -68,12 +73,15 @@ We recommend the following for starters: There are also usage examples for individual components. Use `shiny.fluent::runExample()` to list all available examples. -Appsilon --------- +## Appsilon -Appsilon is the **Full Service Certified RStudio Partner**. Learn more -at [appsilon.com](https://appsilon.com). +Appsilon is a **Posit (formerly RStudio) Full Service Certified Partner**.
+Learn more at [appsilon.com](https://appsilon.com). + +[Get in touch](mailto:opensource@appsilon.com). -Get in touch [support+opensource@appsilon.com](mailto:support+opensource@appsilon.com) +Check our [Open Source tools](https://shiny.tools). + +We are hiring! From fb39079599ab4d90e4c95a5d1484e39fce5ae978 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Fri, 13 Jan 2023 16:11:29 +0100 Subject: [PATCH 4/7] docs: Update NEWS.md --- NEWS.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index c62c4d9b..854f5c45 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,17 +1,30 @@ +# shiny.fluent 0.3.0 + +1. Added `ThemeProvider` component ([#47](https://github.com/Appsilon/shiny.fluent/issues/47)). +2. Added `ShimmeredDetailsList` component +([#34](https://github.com/Appsilon/shiny.fluent/issues/34)). +3. All `.shinyInput` wrappers now have a sensible debounce consistent with vanilla Shiny +([#130](https://github.com/Appsilon/shiny.fluent/issues/130)). +4. Added update functions for all buttons +([#12](https://github.com/Appsilon/shiny.react/issues/12)). +5. `Dropdown.shinyInput` now supports multiselection +([#42](https://github.com/Appsilon/shiny.fluent/issues/42)). + + # shiny.fluent 0.2.2 -* Ensure `DatePicker.shinyInput` with `value = NULL` to behave - consistently with the official behavior. [#118](https://github.com/Appsilon/shiny.fluent/pull/118) +1. Make the behavior of `DatePicker.shinyInput` with `value = NULL` consistent with vanilla Shiny +([#118](https://github.com/Appsilon/shiny.fluent/pull/118)). # shiny.fluent 0.2.0 This is the first public release, with several big interface changes: -* Removed `withReact()`. Components now work without it! -* Added `.shinyInput` suffix to components with interface modified to match vanilla Shiny inputs. - The corresponding components without the suffix now expose unaltered React interface. -* Changed naming convention to `camelCase`. -* Added `setInput()` and `triggerEvent()` helpers. +1. Removed `withReact()`. Components now work without it! +2. Added `.shinyInput` suffix to components with interface modified to match vanilla Shiny inputs. +The corresponding components without the suffix now expose unaltered React interface. +3. Changed naming convention to `camelCase`. +4. Added `setInput()` and `triggerEvent()` helpers. # shiny.fluent 0.1.0 From b8ec00374041f8f05053f5ec7e730d230fc12fa5 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Thu, 12 Jan 2023 15:21:50 +0100 Subject: [PATCH 5/7] docs: Update Authors in DESCRIPTION --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 022a99be..f442415e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,10 +3,10 @@ Title: Microsoft Fluent UI for Shiny Apps Version: 0.2.1 Authors@R: c( - person(given = "Marek", family = "Rogala", role = "aut", email = "marek@appsilon.com"), - person(given = "Kamil", family = "Zyla", role = "aut", email = "kamil@appsilon.com"), - person("Developers", "Appsilon", email = "support+opensource@appsilon.com", role = "cre"), - person(family = "Appsilon Sp. z o.o.", role = "cph") + person("Kamil", "Żyła", role = c("aut", "cre"), email = "opensource+kamil@appsilon.com"), + person("Jakub", "Sobolewski", role = "aut", email = "jakub.sobolewski@appsilon.com"), + person("Marek", "Rogala", role = "aut", email = "marek@appsilon.com"), + person("Appsilon Sp. z o.o.", role = "cph", email = "opensource@appsilon.com") ) Description: It provides all controls from Microsoft Fluent UI. URL: https://appsilon.github.io/shiny.fluent, https://github.com/appsilon/shiny.fluent From cced897eadafe83ea8dd17fe94b50f618c36ed1f Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Thu, 12 Jan 2023 15:24:47 +0100 Subject: [PATCH 6/7] chore: Upgrade Roxygen to 7.2.3 and regenerate documentation --- DESCRIPTION | 2 +- man/DetailsList.Rd | 4 +++- man/GroupedList.Rd | 4 +++- man/List.Rd | 8 +++++--- man/SearchBox.Rd | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f442415e..5579d71c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,7 @@ License: LGPL-3 + file LICENSE Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.3 VignetteBuilder: knitr Depends: R (>= 2.10) diff --git a/man/DetailsList.Rd b/man/DetailsList.Rd index aeb9e411..96eb08fc 100644 --- a/man/DetailsList.Rd +++ b/man/DetailsList.Rd @@ -234,7 +234,9 @@ By default, the List used within DetailsList will use the \code{body} element as To determine if the List within DetailsList should re-render its contents, the component performs a referential equality check within its \code{shouldComponentUpdate} method. This is done to minimize the performance overhead associated with re-rendering the virtualized List pages, as recommended by the \href{https://reactjs.org/docs/optimizing-performance.html#the-power-of-not-mutating-data}{React documentation}. As a result of this implementation, the inner List will not determine it should re-render if the array values are mutated. -To avoid this problem, we recommend re-creating the items array backing the DetailsList by using a method such as \code{Array.prototype.concat} or ES6 spread syntax shown below:\if{html}{\out{
}}\preformatted{public appendItems(): void \{ +To avoid this problem, we recommend re-creating the items array backing the DetailsList by using a method such as \code{Array.prototype.concat} or ES6 spread syntax shown below: + +\if{html}{\out{
}}\preformatted{public appendItems(): void \{ const \{ items \} = this.state; this.setState(\{ diff --git a/man/GroupedList.Rd b/man/GroupedList.Rd index 4defaed4..15e91c8f 100644 --- a/man/GroupedList.Rd +++ b/man/GroupedList.Rd @@ -106,7 +106,9 @@ To determine if the list within the grouped list should re-render its contents, This is done to minimize the performance overhead associating with re-rendering the virtualized List pages, as recommended by the \href{https://reactjs.org/docs/optimizing-performance.html#the-power-of-not-mutating-data}{React documentation}. As a result of this implementation, the inner list will not determine it should re-render if the array values are mutated. -To avoid this problem, we recommend re-creating the items array backing the grouped list by using a method such as \code{Array.prototype.concat} or ES6 spread syntax shown below:\if{html}{\out{
}}\preformatted{public appendItems(): void \{ +To avoid this problem, we recommend re-creating the items array backing the grouped list by using a method such as \code{Array.prototype.concat} or ES6 spread syntax shown below: + +\if{html}{\out{
}}\preformatted{public appendItems(): void \{ const \{ items \} = this.state; this.setState(\{ diff --git a/man/List.Rd b/man/List.Rd index 9e5cae26..31559632 100644 --- a/man/List.Rd +++ b/man/List.Rd @@ -75,13 +75,15 @@ you need to work using the original docs to achieve the desired result. Add the data-is-scrollable="true" attribute to your scrollable element containing the List. -By default, the List will use the  element as the scrollable element. If you contain List within a scrollable 
 using overflow: auto or scroll, List needs to listen for scroll events on that element instead. On initialization, List will traverse up the DOM looking for the first element with the data-is-scrollable attribute to know which element to listen to for knowing when to re-evaulate the visible window. +By default, the List will use the \if{html}{\out{}} element as the scrollable element. If you contain List within a scrollable \if{html}{\out{
}} using overflow: auto or scroll, List needs to listen for scroll events on that element instead. On initialization, List will traverse up the DOM looking for the first element with the data-is-scrollable attribute to know which element to listen to for knowing when to re-evaulate the visible window. } \subsection{My list isn't re-rendering when I mutate its items, what should I do?}{ To determine if List should re-render its contents, the component performs a referential equality check on the items array in its shouldComponentUpdate method. This is done to minimize the performance overhead associating with re-rendering the virtualized list pages, as recommended by the React documentation. -As a result of this implementation, List will not determine it should re-render if values within the array are mutated. To avoid this problem, we recommend re-creating the items array using a method such as Array.prototype.concat or ES6 spread syntax shown below:\preformatted{public appendItems(): void \{ +As a result of this implementation, List will not determine it should re-render if values within the array are mutated. To avoid this problem, we recommend re-creating the items array using a method such as Array.prototype.concat or ES6 spread syntax shown below: + +\if{html}{\out{
}}\preformatted{public appendItems(): void \{ const \{ items \} = this.state; this.setState(\{ @@ -94,7 +96,7 @@ public render(): JSX.Element \{ return ; \} -} +}\if{html}{\out{
}} Since the items array has been re-created, the list will conclude that its contents have changed and it should re-render the new values. } diff --git a/man/SearchBox.Rd b/man/SearchBox.Rd index 354182ac..0dcfcd0c 100644 --- a/man/SearchBox.Rd +++ b/man/SearchBox.Rd @@ -66,7 +66,7 @@ you need to work using the original docs to achieve the desired result. \subsection{Content}{ \itemize{ \item Use placeholder text in the search box to describe what people can search for. For example, "Search", "Search files", or "Search contacts list". -\item Although search entry points tend to be similarly visualized, they can provide access to results that range from broad to narrow. By effectively communicating the scope of a search, you can ensure that people's expectations are met by the capabilities of the search you're performing, which will reduce the possibility of frustration. The search entry point should be placed near the content being searched.

Some common search scopes include: +\item Although search entry points tend to be similarly visualized, they can provide access to results that range from broad to narrow. By effectively communicating the scope of a search, you can ensure that people's expectations are met by the capabilities of the search you're performing, which will reduce the possibility of frustration. The search entry point should be placed near the content being searched.\if{html}{\out{
}}\if{html}{\out{
}}Some common search scopes include: \itemize{ \item \strong{Global}: Search across multiple sources of cloud and local content. Varied results include URLs, documents, media, actions, apps, and more. \item \strong{Web}: Search a web index. Results include pages, entities, and answers. From 86e3dee79cdf4380d25a89fb8f9822306bf919c5 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Thu, 12 Jan 2023 15:22:13 +0100 Subject: [PATCH 7/7] chore: Bump packge version to 0.3.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5579d71c..8e2f74bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: shiny.fluent Title: Microsoft Fluent UI for Shiny Apps -Version: 0.2.1 +Version: 0.3.0 Authors@R: c( person("Kamil", "Żyła", role = c("aut", "cre"), email = "opensource+kamil@appsilon.com"),