Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ 固定表示 ] タイマー機能追加 #2253

Merged
merged 100 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
a283670
Add timer setting
Sep 30, 2024
1f9eff0
Fix: build
Sep 30, 2024
851070d
Add ver.1.85.1 file
Sep 30, 2024
2fa34ac
Add test file
Sep 30, 2024
ca008cf
Add changelog
Sep 30, 2024
849a0c4
Merge develop file
Sep 30, 2024
d9d40aa
Fix :taipo
Sep 30, 2024
ffe9662
Merge develop file
Oct 1, 2024
489e4c1
Add dontShowAgain
Oct 2, 2024
d5f8519
Add timed setting
Oct 2, 2024
ce94385
Fix: taipo
Oct 2, 2024
1e7470d
Fix: sharing duplicated code
Oct 2, 2024
ffa7475
Refactor: auto-converted formatting
Oct 2, 2024
4287819
Add timer setting for editor
Oct 2, 2024
53d06db
Add: line
Oct 2, 2024
f82a526
Fix: changelog
Oct 2, 2024
668a903
Fix: test
Oct 2, 2024
b8cc752
Add dontShowAgain
Oct 2, 2024
45d6082
Add dontShowAgain
Oct 2, 2024
586052b
Undo is-visible
Oct 2, 2024
1764fa0
Prevented unnecessary classes being left behind when fixedPositionTyp…
Oct 2, 2024
9c88765
Fix: Prevent multiple triggers on scroll unless scrollPersistVisible …
Oct 2, 2024
00bc267
Clean up
Oct 2, 2024
5e8c04d
Fix: blockProps
Oct 3, 2024
7edfab8
Fix: Replaced Local Storage with Session Storage for controlling bloc…
Oct 3, 2024
61c5d13
Minor correct
Oct 3, 2024
6d7780b
Fix: Persist visibility when scrolling up if 'scrollPersistVisible' i…
Oct 3, 2024
10b173b
Delete commentout
Oct 3, 2024
3326366
Fix: changelog
Oct 3, 2024
a3590ff
Add pointer-events: none;
Oct 3, 2024
00425a8
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Oct 3, 2024
fedf6ea
Fix: lavel
Oct 3, 2024
f11f8c0
Add translate
Oct 3, 2024
5b40d03
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Oct 7, 2024
dfe9380
Add: Toggle controls for 'Enable Display After Seconds' and 'Enable H…
Oct 7, 2024
3e43873
Fix: text
Oct 7, 2024
a6ce3f7
Build
Oct 7, 2024
ab96b06
Fix: translate
Oct 7, 2024
4645a9b
Revert changes for language files to before commit f11f8c0e16e9f501b4…
Oct 8, 2024
bbd7b82
Merge develop file
Oct 8, 2024
b2fb09c
Fix: Improved input handling for display seconds, ensuring minimum va…
Oct 8, 2024
15aeae1
Merge develop file
Oct 11, 2024
7166af5
Update readme.txt
mtdkei Oct 15, 2024
21c2122
Fix: Prevent 'undefined' class output for fixed position type
Oct 15, 2024
cb61b5f
Fix: Prevent 'undefined' class output for fixed position type
Oct 15, 2024
9e99d22
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Oct 15, 2024
e879bd7
Merge branch 'env/source-map' into add/fixed-display/display-hide-timing
mthaichi Oct 16, 2024
62ba4aa
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Oct 23, 2024
4ce6602
Fix: Ensure 'is-timed-display' class is properly added in save function
Oct 23, 2024
1b78afb
Delete timing setting for scroll
Oct 23, 2024
a5e6a8e
Add Display and Hide After Time
Oct 23, 2024
b01dc7c
Organized
Oct 23, 2024
7290d62
Merge branch 'add/fixed-display/display-hide-timing' of https://githu…
mthaichi Oct 25, 2024
05d9c2e
Merge develop file
Nov 1, 2024
fdb6394
Add ver.1.86.0
Nov 1, 2024
dde5251
Delete src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js
mtdkei Nov 1, 2024
78a5cb6
Delete save_1_85_1
mtdkei Nov 1, 2024
4b7f243
Add test fle
Nov 1, 2024
da51dff
Merge develop file
Nov 8, 2024
a4396d0
In 'Always Visible' mode, 'Do not display again until the browser is …
Nov 8, 2024
e01f754
Fix: pointer-events for show-on-scroll
Nov 8, 2024
24309a2
Fix: PanelBody setting
Nov 8, 2024
0527f24
Delete blockProps style
Nov 8, 2024
1d093fa
Add: initializeDisplayHide
Nov 8, 2024
bbc53f0
Undo toggle settting for Timer
Nov 11, 2024
b282a78
Fix: Switch between classes by mode
Nov 11, 2024
128b20e
Fix: lint
Nov 11, 2024
55d852b
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Nov 11, 2024
64d08f7
Add VK_Blocks_Fixed_Display
Nov 11, 2024
491edb3
Fix: handleVisibility
Nov 11, 2024
2b3531c
Add important
Nov 11, 2024
173d61a
Fix mode switching
Nov 11, 2024
74a18b1
Fix: lint
Nov 11, 2024
02d53be
Fix: html
Nov 11, 2024
377604a
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Nov 13, 2024
d8f46f9
Merge changelog
Nov 18, 2024
bb29dcf
Delete toggle for timer setting
Nov 18, 2024
206ad46
Move to index.php in Fixed Display block
Nov 18, 2024
bcffd86
Add prevModeRef
Nov 18, 2024
01b85dc
Add Hide after seconds for Show on Scroll
Nov 18, 2024
e3f8850
Add data-hide-after-second for show-on-scroll
Nov 18, 2024
9ea9e1f
Delete class setting
Nov 18, 2024
5fd5109
Fix: handleVisibility
Nov 19, 2024
4fbdfe1
Fix: lint
Nov 19, 2024
42fc0b3
Undo getSessionStorageFlag'
Nov 19, 2024
ccf8429
Disable 'Hide after seconds' when Persist visibility is ON
Nov 19, 2024
bf3c17c
Fix: lint
Nov 19, 2024
f431baf
Refactor Fixed Display block to use render_callback instead of add_fi…
Nov 19, 2024
683bfd3
Fix: lint
Nov 19, 2024
841dcf2
Undo block description
Nov 19, 2024
52fed21
Undo commentout
Nov 19, 2024
51a8617
Undo commentout
Nov 19, 2024
dc52351
Change label Settings to Setting
Nov 19, 2024
8e007e0
Add opacity:0 for show-on-scroll
Nov 19, 2024
ae6c96d
Delete :not(.scrolled) admin-bar setting for logged-in
Nov 19, 2024
83f632c
Delete is-hidden
Nov 19, 2024
cb39c19
Undo label
Nov 19, 2024
045e745
Set the margin of blocks directly under .vk_fixed-display to 0.
Nov 19, 2024
4922967
Merge branch 'develop' into add/fixed-display/display-hide-timing
mtdkei Nov 22, 2024
a012b2b
Merge branch 'develop' into add/fixed-display/display-hide-timing
kurudrive Nov 25, 2024
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
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ e.g.
== Changelog ==

[ Add Block ] Add Post list Slider block.
[ Other ][ Slider ] Refactoring editor script.
[ Add function ][ Fixed Display (Pro) ] Added a timer feature to control block appearance/disappearance and a "Do not show again for returning visitors" option. Session Storage is used, and no personal data is collected or tracked. Since Session Storage is used, the block may reappear after the browser is closed or in private browsing mode.
[ Bug fix ][ Cover ] Fixed an issue where, after setting a link in the Cover block and adding two unstyled headings inside it, the content positioning would not apply upon returning to the editing screen (editing screen only).
[ Bug Fix ][ Grid Column Card (Pro) ] Fixed only dots being displayed as separators.
[ Bug fix ][ Post List (Pro) ] Since WordPress 6.7.1 started outputting contain-intrinsic-size: 3000px 1500px, add a reset for this in .card.
[ Other ][ Slider ] Refactoring editor script.

= 1.91.2 =
[ Bug fix ] Fix checkbox misalignment in the admin panel.
Expand Down
12 changes: 12 additions & 0 deletions src/blocks/_pro/fixed-display/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@
"type": "string",
"default": "svh"
},
"displayAfterSeconds": {
"type": "number",
"default": 0
},
"hideAfterSeconds": {
"type": "number",
"default": 0
},
"dontShowAgain": {
"type": "boolean",
"default": false
},
"clientId": {
"type": "string"
},
Expand Down
39 changes: 39 additions & 0 deletions src/blocks/_pro/fixed-display/deprecated/1.86.0/save.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';

export default function save({ attributes }) {
const {
mode,
position,
scrollTiming,
scrollTimingUnit,
blockId,
scrollPersistVisible,
fixedPositionType,
fixedPositionValue,
fixedPositionUnit,
} = attributes;

const blockProps = useBlockProps.save({
className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${
['right', 'left'].includes(position)
? `vk_fixed-display-position-from-${fixedPositionType}`
: ''
} vk_fixed-display-${blockId}`,
style: {
[fixedPositionType]: ['right', 'left'].includes(position)
? `${fixedPositionValue}${fixedPositionUnit}`
: undefined,
},
...(mode === 'show-on-scroll' && {
'data-scroll-timing': scrollTiming.toString(),
'data-scroll-timing-unit': scrollTimingUnit,
'data-persist-visible': scrollPersistVisible ? 'true' : 'false',
}),
});

return (
<div {...blockProps}>
<InnerBlocks.Content />
</div>
);
}
21 changes: 21 additions & 0 deletions src/blocks/_pro/fixed-display/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import save1_75_0 from './1.75.0/save';
import save1_81_1 from './1.81.1/save';
import save1_86_0 from './1.86.0/save';

const blockAttributes = {
mode: {
Expand Down Expand Up @@ -54,7 +55,27 @@ const blockAttributes2 = {
},
};

const blockAttributes3 = {
...blockAttributes2,
displayAfterSeconds: {
type: 'number',
default: 0
},
hideAfterSeconds: {
type: 'number',
default: 0
},
dontShowAgain: {
type: 'boolean',
default: false,
},
};

const deprecated = [
{
attributes: blockAttributes3,
save: save1_86_0,
},
{
attributes: blockAttributes2,
save: save1_81_1,
Expand Down
Loading
Loading