Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.DS_Store
.env
.env.*
.npm/
.cache/
coverage/
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log
*.zip
artefact.xml
7 changes: 7 additions & 0 deletions .pressshipignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.pressshipignore
assets/
src/
.wp-playground/
README.md
package.json
package-lock.json
21 changes: 21 additions & 0 deletions .wp-playground/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"preferredVersions": {
"php": "8.3",
"wp": "7.0"
},
"landingPage": "/wp-admin/post-new.php?post_type=page",
"login": true,
"steps": [
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https://raw.githubusercontent.com/dhanson-wp/scroll-indicator/codex/submission-readiness/.wp-playground/scroll-indicator.zip"
},
"options": {
"activate": true
}
}
]
}
Binary file added .wp-playground/scroll-indicator.zip
Binary file not shown.
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Scroll Indicator is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 2 of the License, or any later version.

Scroll Indicator is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

You should have received a copy of the GNU General Public License along with
Scroll Indicator. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

# Scroll Indicator

Scroll Indicator is a lightweight WordPress block for adding a polished “keep scrolling” cue to landing pages, editorial layouts, hero sections, and long-form content.
Scroll Indicator is a lightweight WordPress block for adding a “keep scrolling” cue to landing pages, editorial layouts, hero sections, and long-form content.

It gives site builders a small, expressive block that feels designed: choose an icon style, tune the size and color, add optional text, and let visitors click or keyboard-activate the indicator to move one viewport down the page.
Site builders can choose an icon style, tune the size and color, add optional text, and let visitors click or keyboard-activate the indicator to move one viewport down the page.

## Highlights

- Five animated icon styles: mouse, arrow, chevron, dots, and hand.
- Preset sizes plus a custom CSS size value.
- Native block editor support for text color, spacing, typography, and alignment.
- Fixed screen positioning and draggable absolute positioning for hero-style sections.
- CSS-only animation that respects `prefers-reduced-motion`.
- Optional helper text beneath the icon.
- Optional hide-after-scrolling behavior.
- Automatic hide-on-scroll behavior.
- Keyboard-accessible click-to-scroll behavior on the front end.
- No animation libraries or heavy runtime dependencies.

Expand Down Expand Up @@ -44,12 +45,19 @@ Create a production build:
npm run build
```

Create a distributable plugin ZIP:
Create a local plugin ZIP:

```bash
npm run plugin-zip
```

PressShip is the preferred WordPress.org submission path for this repo:

```bash
npx pressship pack .
npx pressship publish . --dry-run
```

## Quality Checks

```bash
Expand All @@ -70,6 +78,8 @@ The `assets/` directory contains WordPress.org plugin directory artwork:

These are intended for the WordPress.org SVN `assets` directory after the plugin is approved. They are not required inside the installable plugin ZIP.

The compiled block files live in `compiled/` so PressShip includes them in the installable ZIP by default.

## License

GPLv2 or later.
1 change: 0 additions & 1 deletion build/index-rtl.css

This file was deleted.

1 change: 0 additions & 1 deletion build/index.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion build/index.css

This file was deleted.

1 change: 0 additions & 1 deletion build/index.js

This file was deleted.

1 change: 0 additions & 1 deletion build/style-index-rtl.css

This file was deleted.

1 change: 0 additions & 1 deletion build/style-index.css

This file was deleted.

1 change: 0 additions & 1 deletion build/view.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion build/view.js

This file was deleted.

25 changes: 21 additions & 4 deletions build/block.json → compiled/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"hideAfterScrolling": {
"type": "boolean",
"default": false
"default": true
},
"showText": {
"type": "boolean",
Expand All @@ -32,6 +32,26 @@
"customText": {
"type": "string",
"default": "Scroll down"
},
"positionMode": {
"type": "string",
"default": "flow"
},
"screenPosition": {
"type": "string",
"default": "bottom-center"
},
"absoluteX": {
"type": "number",
"default": 50
},
"absoluteY": {
"type": "number",
"default": 85
},
"flowAlign": {
"type": "string",
"default": "center"
}
},
"supports": {
Expand All @@ -45,9 +65,6 @@
"text": true,
"background": false
},
"typography": {
"fontSize": true
},
"spacing": {
"margin": true,
"padding": true
Expand Down
1 change: 1 addition & 0 deletions compiled/index-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiled/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '2a079bfab507fd75781d');
Loading