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

Use '.jenkins-card' for cards #497

Merged
merged 15 commits into from
Sep 25, 2024
Merged

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented Sep 3, 2024

See #496

Introduced in jenkinsci/jenkins#9148 is the card component. This PR updates the graph view plugin to use those new styles, bringing it inline with core and removing a bunch of CSS. Also updated a few variables to Jenkins colours when possible.

Before

image image

After

image image

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@janfaracik janfaracik requested a review from a team as a code owner September 3, 2024 21:02
@timja timja added the enhancement New feature or request label Sep 3, 2024
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good only issue I found was overflow.

border-radius: 15px;
padding: 20px;
background: var(--card-background);
overflow: auto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likely this change causes graph overflow:

image
pipeline {
    agent any
    stages {
        stage('Non-Parallel Stage') {
            steps {
                echo 'This stage will be executed first.'
            }
        }
        stage('Parallel Stage') {
            failFast true
            parallel {
                stage('Branch A') {
                    steps {
                        echo "On Branch A"
                    }
                }
                stage('Branch B') {
                    steps {
                        echo "On Branch B"
                    }
                }
                stage('Branch C') {
                    stages {
                        stage('Nested 1') {
                            steps {
                                echo "In stage Nested 1 within Branch C"
                            }
                        }
                        stage('Nested 2') {
                            steps {
                                echo "In stage Nested 2 within Branch C"
                            }
                        }
                    }
                }
            }
        }
        stage('Skipped stage') {
            when {
                branch 'master'
            }
            steps {
                echo 'This stage will be skipped.'
            }
        }
        stage('Parallel Stage 2') {
            failFast true
            parallel {
                stage('Branch A') {
                    steps {
                        echo "On Branch A"
                    }
                }
                stage('Branch B') {
                    steps {
                        echo "On Branch B"
                    }
                }
                stage('Branch C') {
                    stages {
                        stage('Nested 1B') {
                            steps {
                                echo "In stage Nested 1B within Branch C"
                            }
                        }
                        stage('Nested 2B') {
                            steps {
                                echo "In stage Nested 2B within Branch C"
                            }
                        }
                    }
                }
            }
        }
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likely this change causes graph overflow:

image ``` pipeline { agent any stages { stage('Non-Parallel Stage') { steps { echo 'This stage will be executed first.' } } stage('Parallel Stage') { failFast true parallel { stage('Branch A') { steps { echo "On Branch A" } } stage('Branch B') { steps { echo "On Branch B" } } stage('Branch C') { stages { stage('Nested 1') { steps { echo "In stage Nested 1 within Branch C" } } stage('Nested 2') { steps { echo "In stage Nested 2 within Branch C" } } } } } } stage('Skipped stage') { when { branch 'master' } steps { echo 'This stage will be skipped.' } } stage('Parallel Stage 2') { failFast true parallel { stage('Branch A') { steps { echo "On Branch A" } } stage('Branch B') { steps { echo "On Branch B" } } stage('Branch C') { stages { stage('Nested 1B') { steps { echo "In stage Nested 1B within Branch C" } } stage('Nested 2B') { steps { echo "In stage Nested 2B within Branch C" } } } } } } } } ```

Good spot, should be sorted now

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there's a couple of pending changes I'll see if we can get in before we bump the baseline, otherwise we can merge this in a week or two if those don't get sorted

@janfaracik
Copy link
Contributor Author

LGTM, there's a couple of pending changes I'll see if we can get in before we bump the baseline, otherwise we can merge this in a week or two if those don't get sorted

Awesome, thanks!

@timja timja merged commit dbadd48 into jenkinsci:main Sep 25, 2024
17 checks passed
@janfaracik janfaracik deleted the use-jenkins-cards branch September 25, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants