Skip to content

Commit e314c9e

Browse files
wxiaoguanglunny
andauthored
Fix the full-height problem for all pages (#22905)
Really fix #22883, close #22901 I made a mistake that the global styles in RepoActionView.vue could still pollute global styles (I forgot that the code of this component is still loaded on every page, instead of loaded on demand) This PR makes a complete fix: only change the page's full-height behavior if the component is used. Screenshot after the fix: <details> ![image](https://user-images.githubusercontent.com/2114189/218664776-0dbcd469-2c36-4e17-972f-e44fa3b81ba6.png) </details> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent d306ab2 commit e314c9e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web_src/js/components/RepoActionView.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ export function initRepositoryActionView() {
268268
const el = document.getElementById('repo-action-view');
269269
if (!el) return;
270270
271+
// TODO: the parent element's full height doesn't work well now,
272+
// but we can not pollute the global style at the moment, only fix the height problem for pages with this component
273+
const parentFullHeight = document.querySelector('body > div.full.height');
274+
if (parentFullHeight) parentFullHeight.style.paddingBottom = '0';
275+
271276
const view = createApp(sfc, {
272277
runIndex: el.getAttribute('data-run-index'),
273278
jobIndex: el.getAttribute('data-job-index'),
@@ -412,11 +417,6 @@ export function initRepositoryActionView() {
412417
<style lang="less">
413418
// some elements are not managed by vue, so we need to use global style
414419
415-
// TODO: the parent element's full height doesn't work well now
416-
body > div.full.height {
417-
padding-bottom: 0;
418-
}
419-
420420
.job-status-rotate {
421421
animation: job-status-rotate-keyframes 1s linear infinite;
422422
}

0 commit comments

Comments
 (0)