Skip to content

Commit

Permalink
Attempt auto readme generation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkeppeler committed Apr 15, 2023
1 parent 27cfbf7 commit 5bb77ef
Show file tree
Hide file tree
Showing 21 changed files with 1,203 additions and 271 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Update README.md with generated image grids

on:
push:
branches:
- update-readme

jobs:
generate_image_grids:
runs-on: macOS-latest

strategy:
fail-fast: false
matrix:
api-level: [29]
steps:
- uses: actions/checkout@v2
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Gradle cache
uses: gradle/gradle-build-action@v2

- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}

- name: Install Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

- name: Install ADB
run: brew install android-platform-tools

- name: Run CaptureDialogSamples Test
uses: ReactiveCircus/android-emulator-runner@v2.28.0
with:
api-level: ${{ matrix.api-level }}
target: default
profile: Nexus 6
emulator-update-sdk: true
cores: 6
script: |
adb shell pm grant com.mk.sheets android.permission.WRITE_EXTERNAL_STORAGE
./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=com.mk.sheets.sample_images.CaptureDialogSamples
adb pull /storage/emulated/0/Download/sheets/ ./docs/res/sheets
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install Pillow
run: pip install Pillow

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Generate image grid in README
run: |
python3 scripts/generate_image_grid.py
- name: Commit and Push Changes
run: |
git config user.name "README Bot"
git config user.email "<>"
git add README.md
git add docs/res/sheets
git add docs/README.md
git commit -m "Update README.md"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
205 changes: 3 additions & 202 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,211 +86,12 @@ Available modules: `core` | `info` | `color` | `calendar` | `clock` | `duration`
[Sheets-Compose-Dialogs General Documentation](https://maxkeppeler.notion.site/sheets-compose-dialogs-804f0ebcb2c84b98b7afa5f687295aed)

# Showcase
Check out some of the use-cases as dialogs. All of them could be displayed within a PopUp, BottomSheet or another container view as well.
Check out some of the use-cases as dialogs. All of them can be displayed within a PopUp, BottomSheet or another container view as well.
</br>
</br>

## Color Dialog / View
The color dialog / view allows you to pick a color from a range of template colors or a custom color.
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_color_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_color_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_color_sample_3.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_color_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_color_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_color_sample_3.gif" /></td>
</tr>
</table>

## Calendar Dialog / View
The calendar dialog / view allows you to pick a date, multiple dates or a range.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_calendar_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_calendar_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_calendar_sample_3.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_calendar_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_calendar_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_calendar_sample_3.gif" /></td>
</tr>
</table>


## Clock Dialog / View
The clock dialog / view allows you to pick a clock time, in either the 12-Hour-Format or the 24-Hour-Format.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th></th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_clock_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_clock_sample_2.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_clock_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_clock_sample_2.gif" /></td>
</tr>
</table>


## Duration Dialog / View
The duration dialog / view allows you to pick a duration time within the bounds of a time format.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th></th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_duration_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_duration_sample_2.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_duration_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_duration_sample_2.gif" /></td>
</tr>
</table>

## Date-Time Dialog / View
The date-time dialog / view allows you to pick a date and/ or clock-time in a quick spinner-styled way.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_date-time_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_date-time_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_date-time_sample_3.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_date-time_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_date-time_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_date-time_sample_3.gif" /></td>
</tr>
</table>


## Option Dialog / View
The option dialog / view allows you to pick one or multiple options. Options can be preselected, disabled and the selection can be limited.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_option_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_option_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_option_sample_3.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_option_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_option_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_option_sample_3.gif" /></td>
</tr>
</table>


## List Dialog / View
The list dialog / view allows you to pick one or multiple options within a vertical list. Options can be preselected and the selection can be limited. The options can be displayed with a CheckBoxes and RadioButtons depending on the selection type.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th>Sample 4</th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_list_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_list_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_list_sample_3.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_list_sample_4.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_list_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_list_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_list_sample_3.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_list_sample_4.gif" /></td>
</tr>
</table>


## Input Dialog / View
The input dialog / view allows you to build up a small form of various components to collect quickly information.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th>Sample 4</th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_input_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_input_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_input_sample_3.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_input_sample_4.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_input_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_input_sample_2.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_input_sample_3.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_input_sample_4.gif" /></td>
</tr>
</table>

## Emoji Dialog / View
The emoji dialog / view allows you to pick an emoji.
</br>
<table>
<tr>
<th>Sample 1</th>
<th>Sample 2</th>
<th></th>
<th></th>
</tr>
<tr>
<td width="25%"><img src="docs/res/light/dialog_emoji_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/light/dialog_emoji_sample_2.gif" /></td>
</tr>
<tr>
<td width="25%"><img src="docs/res/dark/dialog_emoji_sample_1.gif" /></td>
<td width="25%"><img src="docs/res/dark/dialog_emoji_sample_2.gif" /></td>
</tr>
</table>

Credits to [Vannik Tech's Emoji library](https://github.com/vanniktech/Emoji) - this module makes use of that lib.
<!-- AUTO-GENERATED-SAMPLES-CONTENT:START -->
<!-- AUTO-GENERATED-SAMPLES-CONTENT:END -->

## Donate

Expand Down
7 changes: 5 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ dependencies {

// Dependencies of sheets-compose-dialogs
//
// val sheetsVersion = "0.0.1"
//
// val sheetsVersion = "1.1.1"
////
// implementation("com.maxkeppeler.sheets-compose-dialogs:core:$sheetsVersion")
// implementation("com.maxkeppeler.sheets-compose-dialogs:info:$sheetsVersion")
// implementation("com.maxkeppeler.sheets-compose-dialogs:color:$sheetsVersion")
Expand Down Expand Up @@ -121,9 +121,12 @@ dependencies {
// Test libs

androidTestImplementations(
Dependencies.AndroidX.Test.TEST_CORE,
Dependencies.AndroidX.Test.TEST_RUNNER,
Dependencies.AndroidX.Test.JUNIT,
Dependencies.AndroidX.Test.ESPRESSO_CORE,
Dependencies.Compose.Test.JUNIT,
project(":test")
)
debugImplementations(
Dependencies.Compose.Test.TOOLING,
Expand Down

0 comments on commit 5bb77ef

Please sign in to comment.