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

Allow for more flexible layouts in layout.jelly #8794

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented Dec 20, 2023

Background

Currently in Jenkins you're limited to three layout types - two-column, one-column and full-screen. This PR reworks layout.jelly to allow for more layout types, for example a three column layout or a layout with the side panel on the right.

This gives developers more flexibility in how they approach the design of their pages and also simplifies how layout.jelly and it's related stylings work.

Testing done

Proposed changelog entries

  • N/A

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@jenkinsci/sig-ux

Before the changes are marked as ready-for-merge:

Maintainer checklist

@@ -27,8 +27,7 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout permissions="${app.MANAGE_AND_SYSTEM_READ}" title="${%System}" type="one-column">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One issue with the current approach is that there can be a mismatch between the page type and it's contents - on the Configure page it includes a sidebar however it isn't displayed due to the type being set to one-column. The inverse could be true as well where the page type is two-column but a side panel hasn't been provided.

@@ -34,16 +34,14 @@ THE SOFTWARE.
Generates a row containing the page title and an optional set of controls
</st:documentation>

<j:if test="${mode=='main-panel' or mode=='side-panel'}">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This if condition wasn't needed so I've removed it.

@@ -58,7 +58,7 @@ THE SOFTWARE.
(The permissions will be checked against the "it" object.)
</st:attribute>
<st:attribute name="type" use="optional">
Available values: two-column (by default), one-column (full-width size) or full-screen (since 2.53).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The type attribute now only works if it's set to full-screen.

@@ -3,7 +3,6 @@
.jenkins-section {
border-top: 2px solid var(--panel-border-color);
padding: var(--section-padding) 0 0 0;
max-width: 1800px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the styling, let's just fill the available width and let the parent container control how wide that can be.

Comment on lines -195 to -197
<j:set var="mode" value="side-panel" />
<d:invokeBody />
Copy link
Member

@daniel-beck daniel-beck Dec 21, 2023

Choose a reason for hiding this comment

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

Breaks all context menus, see ModelObjectWithContextMenu.ContextMenu#from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Fixed it and added a comment to side-panel.jelly

@daniel-beck
Copy link
Member

This PR looks a lot like

For new APIs and extension points, there is a link to at least one consumer.

would apply (on a UI level), but I don't see consumers for this change?

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Jan 25, 2024
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Mar 18, 2024
@janfaracik
Copy link
Contributor Author

This PR looks a lot like

For new APIs and extension points, there is a link to at least one consumer.

would apply (on a UI level), but I don't see consumers for this change?

I've added some guidance on using the new layout system in the Design Library - jenkinsci/design-library-plugin#315 - intending to update the UI of the plugin itself to use a multi column layout, however I haven't had the time recently.

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot added unresolved-merge-conflict There is a merge conflict with the target branch. and removed unresolved-merge-conflict There is a merge conflict with the target branch. labels Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Apr 10, 2024
@timja
Copy link
Member

timja commented May 21, 2024

This PR looks a lot like

For new APIs and extension points, there is a link to at least one consumer.

would apply (on a UI level), but I don't see consumers for this change?

I've added some guidance on using the new layout system in the Design Library - jenkinsci/design-library-plugin#315 - intending to update the UI of the plugin itself to use a multi column layout, however I haven't had the time recently.

possible to update the UI to use it? should really have a consumer before shipping something like this

@timja timja added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label May 21, 2024
@janfaracik
Copy link
Contributor Author

possible to update the UI to use it? should really have a consumer before shipping something like this

Will do 👍

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label May 27, 2024
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Jun 8, 2024
@janfaracik
Copy link
Contributor Author

possible to update the UI to use it? should really have a consumer before shipping something like this

Updated the Design Library with an additional side-panel which gives an overview of the page jenkinsci/design-library-plugin#315

image

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Jun 11, 2024
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Jun 11, 2024
@timja timja added the web-ui The PR includes WebUI changes which may need special expertise label Jun 19, 2024
@daniel-beck daniel-beck added the security-approved @jenkinsci/core-security-review reviewed this PR for security issues label Jun 25, 2024
@daniel-beck
Copy link
Member

possible to update the UI to use it? should really have a consumer before shipping something like this

Updated the Design Library with an additional side-panel which gives an overview of the page jenkinsci/design-library-plugin#315

I don't think the UI demo plugin qualifies as a consumer that would validate that this change does anything useful.

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Jul 13, 2024
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted security-approved @jenkinsci/core-security-review reviewed this PR for security issues unresolved-merge-conflict There is a merge conflict with the target branch. web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants