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

Revert SummernoteConfig toolbarOptions code, Array.asList is unmodifiable #1157

Closed
Closed
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
db0f05a
update bootstrap italia to version 2.8.7
r1gm Sep 10, 2024
181af71
typo fix
r1gm Sep 10, 2024
d9c98f7
exclude dependency, use current wicket-bootstrap webjar version
r1gm Sep 10, 2024
410a67d
Bump org.webjars.npm:eonasdan__tempus-dominus from 6.9.9 to 6.9.10 (#…
dependabot[bot] Sep 13, 2024
ff7be79
Bump ch.qos.logback:logback-classic from 1.5.7 to 1.5.8 (#1141)
dependabot[bot] Sep 13, 2024
e2e9cf0
Bump jetty.version from 11.0.23 to 11.0.24 (#1139)
dependabot[bot] Sep 13, 2024
81e793f
Bump org.webjars:jquery-ui from 1.13.3 to 1.14.0 (#1140)
dependabot[bot] Sep 13, 2024
0c403ce
Bump org.apache.commons:commons-lang3 from 3.16.0 to 3.17.0 (#1137)
dependabot[bot] Sep 13, 2024
2c25f07
Bump maven-surefire-plugin.version from 3.4.0 to 3.5.0 (#1136)
dependabot[bot] Sep 13, 2024
ce1f068
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.8.0 to 3.10…
dependabot[bot] Sep 13, 2024
5210837
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.4.0 to 3.5…
dependabot[bot] Sep 13, 2024
f5001e5
Bump org.mockito:mockito-core from 5.12.0 to 5.13.0 (#1133)
dependabot[bot] Sep 13, 2024
7c73d1c
Exclude org,webjars.npm:design-tokens-italia for bootstrap-italia theme
martin-g Sep 13, 2024
75a50e0
Merge branch 'martin-g:wicket-10.x-bootstrap-5.x' into wicket-10.x-bo…
r1gm Sep 17, 2024
5ad013c
Merge branch 'martin-g:wicket-10.x-bootstrap-5.x' into wicket-10.x-bo…
r1gm Oct 17, 2024
046c015
revert problematic code to the good old code, Arrays.asList is unmodi…
r1gm Oct 17, 2024
5dfca0b
Merge remote-tracking branch 'upstream/wicket-10.x-bootstrap-5.x' int…
r1gm Oct 17, 2024
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
@@ -1,6 +1,6 @@
package de.agilecoders.wicket.extensions.markup.html.bootstrap.editor;

import java.util.Arrays;
import com.google.common.collect.Lists;
Copy link
Owner

Choose a reason for hiding this comment

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

Actually we are trying to get rid of Guava usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this code acceptable ?

new ArrayList<>(Arrays.asList("picture", "link", "video", "table", "hr"));

Copy link
Owner

Choose a reason for hiding this comment

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

Yes!
Shorter: new ArrayList<>(List.of("picture", "link", "video", "table", "hr"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Affirmative

import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
Expand Down Expand Up @@ -55,14 +55,14 @@ public class SummernoteConfig extends AbstractConfig {
private static final IKey<Map<String, List<String>>> ToolbarOptions = newKey("ToolbarOptions", null);


private Map<String, List<String>> toolbarOptions = new LinkedHashMap<>() {
private final Map<String, List<String>> toolbarOptions = new LinkedHashMap<>() {
private static final long serialVersionUID = 1L;

{
put("Style", Arrays.asList("style", "fontname", "fontsize", "color", "bold", "italic", "underline", "strikethrough", "clear"));
put("Layout", Arrays.asList("ul", "ol", "paragraph", "height"));
put("Insert", Arrays.asList("picture", "link", "video", "table", "hr"));
put("Misc", Arrays.asList("fullscreen", "codeview", "undo", "redo", "help"));
put("Style", Lists.newArrayList("style", "fontname", "fontsize", "color", "bold", "italic", "underline", "strikethrough", "clear"));
put("Layout", Lists.newArrayList("ul", "ol", "paragraph", "height"));
put("Insert", Lists.newArrayList("picture", "link", "video", "table", "hr"));
put("Misc", Lists.newArrayList("fullscreen", "codeview", "undo", "redo", "help"));
}
};

Expand Down