You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by GitBox <gi...@apache.org> on 2021/04/18 05:01:13 UTC

[GitHub] [isis] mwhesse opened a new pull request #495: Upgrade bootstrap 3 to 4

mwhesse opened a new pull request #495:
URL: https://github.com/apache/isis/pull/495


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [isis] mwhesse commented on a change in pull request #495: ISIS-2617 - Upgrade bootstrap 3 to 4

Posted by GitBox <gi...@apache.org>.
mwhesse commented on a change in pull request #495:
URL: https://github.com/apache/isis/pull/495#discussion_r615429366



##########
File path: core/pom.xml
##########
@@ -180,14 +180,15 @@
 		<togglz.version>2.9.6</togglz.version>
 
 		<vaadin.version>19.0.4</vaadin.version>
-
+		

Review comment:
       Remove whitespaces

##########
File path: examples/demo/wicket/src/main/java/demoapp/webapp/wicket/DemoAppWicket.java
##########
@@ -72,7 +73,7 @@
      * entry point by searching for classes having a {@code main(...)}
      */
     public static void main(String[] args) {
-        //IsisPresets.prototyping();
+    	IsisPresets.prototyping();

Review comment:
       Remove/comment

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/ExtendedPopoverConfig.java
##########
@@ -0,0 +1,31 @@
+package org.apache.isis.viewer.wicket.ui.util;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.PopoverConfig;
+import de.agilecoders.wicket.jquery.IKey;
+
+public class ExtendedPopoverConfig extends PopoverConfig {
+
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+     * Overflow constraint boundary of the popover. 
+     * Accepts the values of 'viewport', 'window', 'scrollParent', or an HTMLElement reference (JavaScript only). 
+     * For more information refer to Popper.js's preventOverflow docs.
+     */
+    private static final IKey<String> Boundary = newKey("boundary", PopoverBoundary.scrollParent.name());
+    
+    public enum PopoverBoundary {
+    	viewport, window, scrollParent
+    }
+    
+    public ExtendedPopoverConfig withBoundary(PopoverBoundary boundary) {
+    	return withBoundary(boundary.name());
+    }
+    
+    public ExtendedPopoverConfig withBoundary(String boundary) {
+    	put(Boundary, boundary);
+    	return this;
+    }
+}

Review comment:
       Maybe submit this as PR to wicket-boostrap? We shouldn't maintain these kind of things locally

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.java
##########
@@ -83,8 +83,8 @@ public void renderHead(IHeaderResponse response) {
         response.render(CssHeaderItem.forReference(new CssResourceReference(ServiceActionsPanel.class, "ServiceActionsPanel.css")));
         Tooltips.renderHead(response);
 
-        response.render(JavaScriptHeaderItem.forReference(DropdownAutoOpenJavaScriptReference.instance()));
-        response.render(OnDomReadyHeaderItem.forScript("$('.dropdown-toggle').dropdownHover();"));
+        // response.render(JavaScriptHeaderItem.forReference(DropdownAutoOpenJavaScriptReference.instance()));

Review comment:
       Review if/how this can be replaced with native boostrap JS

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
##########
@@ -92,6 +92,8 @@ public TextFieldWithDateTimePicker(
         config.minDate(datePickerMinDate);
         config.maxDate(datePickerMaxDate);
 
+        config.keepOpen(true);

Review comment:
       Make configurable

##########
File path: api/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ColTest.java
##########
@@ -58,6 +58,6 @@ public void with_additional_classes() throws Exception {
         bs3Col.getSizeSpans().add(SizeSpan.with(Size.MD, 5));
         bs3Col.getSizeSpans().add(SizeSpan.offset(Size.MD, 2));
 
-        assertThat(bs3Col.toCssClass(), is(equalTo("col-sm-6 col-md-5 col-md-offset-2")));
+        assertThat(bs3Col.toCssClass(), is(equalTo("col-sm-6 col-md-5 offset-2")));

Review comment:
       Add a test for Size.XS, should render "col-N"

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
##########
@@ -307,9 +308,13 @@ protected UiHintContainer getUiHintContainerIfAny() {
      */
     private void addBootLint(final IHeaderResponse response) {
         // rather than using the default BootlintHeaderItem.INSTANCE;
-        // this allows us to assign 'form-control' class to an <a> (for x-editable styling)
+        // this allows us to assign 'form-control' class to an <a> (for x-editable styling)    	
+    	
+    	// Bootlint not available for BS4 (as for now)

Review comment:
       Evaluate where this is going with bootlint supporting BS4, otherwise remove

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
##########
@@ -131,16 +133,21 @@ protected void onComponentTag(ComponentTag tag) {
 
         checkComponentTag(tag, "input");
         Attributes.set(tag, "type", "text");
+        
+        Attributes.addClass(tag, "datetimepicker-input");
+        Attributes.set(tag, "data-toggle", "datetimepicker");
+        Attributes.set(tag, "data-target", getMarkupId());
     }
 
     @Override
     public void renderHead(final IHeaderResponse response) {
         super.renderHead(response);
 
-        response.render(CssHeaderItem.forReference(new CssResourceReference(TextFieldWithDateTimePicker.class, "css/bootstrap-datetimepicker.css")));
+        response.render(CssHeaderItem.forReference(new CssResourceReference(TextFieldWithDateTimePicker.class, "css/fa-patch.css")));

Review comment:
       See how we can get rid of this, maybe submit a patch to the datetime-picker project?

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
##########
@@ -131,16 +133,21 @@ protected void onComponentTag(ComponentTag tag) {
 
         checkComponentTag(tag, "input");
         Attributes.set(tag, "type", "text");
+        
+        Attributes.addClass(tag, "datetimepicker-input");
+        Attributes.set(tag, "data-toggle", "datetimepicker");
+        Attributes.set(tag, "data-target", getMarkupId());

Review comment:
       Add autocomplete="off" attribute

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/DateTimeConfig.java
##########
@@ -36,12 +36,17 @@
 
 /**
  * Configuration holder for all {@link TextFieldWithDateTimePicker} configurations.
- * Provides settings for <a href="https://github.com/Eonasdan/bootstrap-datetimepicker">Bootstrap Datetime picker</a>
+ * Provides settings for <a href="https://github.com/tempusdominus/bootstrap-4">Tempus Dominus Bootstrap 4 Datetime Picker</a>
  * JavaScript widget
  */
 public class DateTimeConfig extends AbstractConfig {
     private static final long serialVersionUID = 1L;
 
+    /**
+     * The earliest date that may be selected; all earlier dates will be disabled.

Review comment:
       Fix comment

##########
File path: viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java
##########
@@ -130,8 +130,10 @@ private void setActiveTheme(String activeTheme) {
             bootstrapSettings.setThemeProvider(new SingleThemeProvider(theme));
         } else if (theme instanceof BootswatchTheme) {
             bootstrapSettings.setThemeProvider(new BootswatchThemeProvider((BootswatchTheme) theme));
+            /*
         } else if (theme instanceof VegibitTheme) {
             bootstrapSettings.setThemeProvider(new VegibitThemeProvider((VegibitTheme) theme));
+            */

Review comment:
       Remove




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [isis] andi-huber merged pull request #495: ISIS-2617 - Upgrade bootstrap 3 to 4

Posted by GitBox <gi...@apache.org>.
andi-huber merged pull request #495:
URL: https://github.com/apache/isis/pull/495


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org