Skip to content

fix: app details manifest scroll on change of resolution #801

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

Merged
merged 3 commits into from
Jun 26, 2025
Merged
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
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.16.0",
"version": "1.16.1",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
5 changes: 3 additions & 2 deletions src/Shared/Hooks/useStickyEvent/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

export const FALLBACK_SENTINEL_HEIGHT = '1px'
export const SENTINEL_HEIGHT_BUFFER = 2
export const FALLBACK_SENTINEL_HEIGHT = `${SENTINEL_HEIGHT_BUFFER}px`
export const OBSERVER_THRESHOLD = 1
export const OBSERVER_ROOT_MARGIN = '0px'
export const OBSERVER_ROOT_MARGIN = '1px'
6 changes: 3 additions & 3 deletions src/Shared/Hooks/useStickyEvent/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { FALLBACK_SENTINEL_HEIGHT } from './constants'
import { FALLBACK_SENTINEL_HEIGHT, SENTINEL_HEIGHT_BUFFER } from './constants'
import { UseStickyEventReturnType } from './types'

export const getHeightForStickyElementTopOffset = <T extends HTMLElement>({
Expand All @@ -30,7 +30,7 @@ export const getHeightForStickyElementTopOffset = <T extends HTMLElement>({
const doesTopOffsetContainCalc = calcRegex.test(topValue)

if (doesTopOffsetContainCalc) {
return topValue.replace(calcRegex, (match) => `calc(${match} + 1px)`)
return topValue.replace(calcRegex, (match) => `calc(${match} + ${SENTINEL_HEIGHT_BUFFER}px)`)
}

return topValue.replace(/\d+(\.\d+)?/g, (match) => {
Expand All @@ -40,6 +40,6 @@ export const getHeightForStickyElementTopOffset = <T extends HTMLElement>({
return FALLBACK_SENTINEL_HEIGHT
}

return `${nMatch + 1}`
return `${nMatch + SENTINEL_HEIGHT_BUFFER}`
})
}
Loading