Skip to content

Commit 6a8ee06

Browse files
Merge branch 'current' into freshness
2 parents 6eccc9c + dc9ac9a commit 6a8ee06

File tree

2 files changed

+39
-23
lines changed

2 files changed

+39
-23
lines changed

website/snippets/_enterprise-permissions-table.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ The project roles enable you to work within the projects in various capacities.
7878
| Credentials | W | W | W | W | R | W | | | | R | R | |
7979
| Custom env. variables | W | W | W | W | W | W | R | | | R | W | |
8080
| dbt adapters | W | W | W | W | R | W | | | | R | R | |
81-
| Develop (IDE or dbt Cloud CLI) | W | W | | W | | | | | | | | |
81+
| Develop <br />(IDE or dbt Cloud CLI) | W | W | | W | | | | | | | | |
8282
| Environments | W | R | R | R | R | W | R | | | R | R | |
8383
| Jobs | W | R | R | W | R | W | R | | | R | R | |
8484
| Metadata | R | R | R | R | R | R | R | R | | R | R | |
85-
| Permissions | W | | R | R | R | | | | | | W | |
86-
| Profile | W | R | W | R | R | R | | | | R | R | |
85+
| Permissions (Groups & Licenses) | W | | R | R | R | | | | | | W | |
86+
| Profile (Credentials) | W | R | W | R | R | R | | | | R | R | |
8787
| Projects | W | W | W | W | W | R | R | | | R | W | |
8888
| Repositories | W | | R | R | W | | | | | R | R | |
8989
| Runs | W | R | R | W | R | W | R | | | R | R | |

website/src/components/detailsToggle/index.js

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,49 @@ import styles from './styles.module.css';
33

44
function detailsToggle({ children, alt_header = null }) {
55
const [isOn, setOn] = useState(false);
6-
const [hoverActive, setHoverActive] = useState(true);
6+
const [isScrolling, setIsScrolling] = useState(false); // New state to track scrolling
77
const [hoverTimeout, setHoverTimeout] = useState(null);
88

99
const handleToggleClick = () => {
10-
setHoverActive(true); // Disable hover when clicked
1110
setOn(current => !current); // Toggle the current state
12-
};
13-
14-
const handleMouseEnter = () => {
15-
if (isOn) return; // Ignore hover if already open
16-
setHoverActive(true); // Enable hover
17-
const timeout = setTimeout(() => {
18-
if (hoverActive) setOn(true);
19-
}, 500);
20-
setHoverTimeout(timeout);
21-
};
22-
23-
const handleMouseLeave = () => {
24-
if (!isOn) {
11+
};
12+
13+
const handleMouseEnter = () => {
14+
if (isOn || isScrolling) return; // Ignore hover if already open or if scrolling
15+
const timeout = setTimeout(() => {
16+
if (!isScrolling) setOn(true);
17+
}, 700); //
18+
setHoverTimeout(timeout);
19+
};
20+
21+
const handleMouseLeave = () => {
22+
if (!isOn) {
2523
clearTimeout(hoverTimeout);
2624
setOn(false);
27-
}
28-
};
25+
}
26+
};
27+
28+
const handleScroll = () => {
29+
setIsScrolling(true);
30+
clearTimeout(hoverTimeout);
31+
setOn(false);
32+
33+
// Reset scrolling state after a delay
34+
setTimeout(() => {
35+
setIsScrolling(false);
36+
}, 800);
37+
};
38+
39+
useEffect(() => {
40+
window.addEventListener('scroll', handleScroll);
41+
return () => {
42+
window.removeEventListener('scroll', handleScroll);
43+
};
44+
}, []);
2945

30-
useEffect(() => {
31-
return () => clearTimeout(hoverTimeout);
32-
}, [hoverTimeout]);
46+
useEffect(() => {
47+
return () => clearTimeout(hoverTimeout);
48+
}, [hoverTimeout]);
3349

3450
return (
3551
<div className='detailsToggle'>

0 commit comments

Comments
 (0)