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

XWIKI-22631: color theme list disorganized after changing color theme #3671

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ThemeApplicationWebHomePage extends ViewPage
@FindBy(id = "newThemeName")
private WebElement newThemeNameInput;

@FindBy(xpath = "//div[@class='theme-creation-form']//input[@type='submit']")
@FindBy(xpath = "//form[contains(@class, 'theme-creation-form')]//input[@type='submit']")
private WebElement createNewThemeButton;

public static ThemeApplicationWebHomePage gotoPage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
#set ($isCurrentTheme = ($currentThemeDoc.documentReference == $themeReference))
#set ($themeDoc = $xwiki.getDocument($themeReference))
#set ($themeObj = $themeDoc.getObject('FlamingoThemesCode.ThemeClass'))
(% class="theme #if($isCurrentTheme) current-theme#end" %)
* (% class="theme #if($isCurrentTheme) current-theme#end" %)
manuelleduc marked this conversation as resolved.
Show resolved Hide resolved
(((
## Display the mockup
#themeMockup($themeObj)
Expand Down Expand Up @@ -262,23 +262,16 @@
####################################
#macro(creationForm)
#if($xwiki.hasAccessLevel('edit', $xcontext.user, 'FlamingoThemes.AnyPage____________'))
(% class="clearfix" %)
(((

{{html}}
<div class="theme-creation-form" >
<form action="$doc.getURL()" method="post" class="form-inline">
$services.icon.renderHTML('add')
<input type="hidden" name="form_token" value="$services.csrf.token" />
<input type="hidden" name="action" value="create"/>
<label for="newThemeName" class="hidden">$services.localization.render('platform.flamingo.themes.home.newThemeName')</label>
<input type="text" name="newThemeName" id="newThemeName" value="$services.localization.render('platform.flamingo.themes.home.newThemeName')" class="withTip" size="30"/>
<input type="submit" value="$services.localization.render('platform.flamingo.themes.home.create')" class="button"/>
</form>
</div>
<form class="theme-creation-form form-inline" action="$doc.getURL()" method="post">
$services.icon.renderHTML('add')
<input type="hidden" name="form_token" value="$services.csrf.token" />
<input type="hidden" name="action" value="create"/>
<label for="newThemeName" class="hidden">$services.localization.render('platform.flamingo.themes.home.newThemeName')</label>
<input type="text" name="newThemeName" id="newThemeName" value="$services.localization.render('platform.flamingo.themes.home.newThemeName')" class="withTip" size="30"/>
<input type="submit" value="$services.localization.render('platform.flamingo.themes.home.create')" class="button"/>
</form>
{{/html}}

)))
#end
#end
####################################
Expand Down Expand Up @@ -434,31 +427,44 @@
<property>
<code>#template('colorThemeInit.vm')
.theme {
border: 1px dotted $theme.borderColor;
float: left;
margin: 0 1em 1em 0;
display: flex;
align-items: center;
gap: 1rem;
border: 1px solid $theme.borderColor;
padding: 2px 4px;
width: 300px;
/* Even when the content changes, takes all the space given to it in the grid of themes. */
height: 100%;
}

.current-theme {
background-color: $theme.highlightColor;
}

.theme-info {
margin-left: 60px;
color: $theme.textSecondaryColor;
font-size: .9em;
}

.theme-info h3{
margin-top: 0;
border-bottom: 1px solid $theme.borderColor;
}

/* Clear the floatting strategy after the display of all themes */
/* Clear the floating strategy after the display of all themes */
.theme-viewer h2, .theme-creation-form {
clear: both;
display: flex;
gap: .5rem;
align-items: center;
margin-bottom: 1em;
}

.theme-viewer ul {
/* We remove the default UL styles since we want to use a flex display to make a grid of items.*/
list-style: none;
manuelleduc marked this conversation as resolved.
Show resolved Hide resolved
padding-left: 0;
display: flex;
flex-wrap: wrap;
gap: 1rem;
}

.mockup-page {
Expand Down Expand Up @@ -619,13 +625,6 @@
border-width: 1px;
left: 12px;
}

.theme-creation-form form {
display: inline-block;
padding: .5em;
margin-bottom: 1em;
}

</code>
</property>
<property>
Expand Down