fulcrologic / fulcro-rad-semantic-ui Goto Github PK
View Code? Open in Web Editor NEWSemantic UI Rendering Plugin for RAD
License: MIT License
Semantic UI Rendering Plugin for RAD
License: MIT License
After update to the latest library I found that entity picker ToOnePicker used in form pickers changed rendering from flat to button.
Styling is a matter of personal taste, I am not complaining :-) However the change introduced visible rendering glitch on poup, where button and menu are not aligned (top-down is off by one pixel).
I verified also fulcro-rad-demo and found that Category is also impacted:
However enumerated values State or User Role on Invoice are not :
The reason is that while enumerated values use ui active visible searach selection dropdown
, ToOnePicker wraps it with ui small menu
I found the change was introduced by @holyjak in a5fa604
I feel that explicit override of :marginTop
suggests that menu element is not being used with its original intent.
Suggested solution
Personally I find buttons in forms distracting but as I wrote, YMMV. Would you consider making ToOnePicker's class a parameter so one can turn it off? Thank you.
The return value of report-row-button-renderer is never checked for nil here. Am I missing something?
In semantic_ui_options it states returning nil should render the default button, but it skips the render instead of falling back to default in my testing.
I've tried adding two type :instant
controls to add from:
and to:
time based filtering to a report.
::m.job/from {:type :instant :label "From:" :style :starting-date :onChange (fn [instance v] (control/run! instance))}
::m.job/to {:type :instant :label "To:" :style :ending-date :onChange (fn [instance v] (control/run! instance))}
I've used :starting-date
and :ending-date
style for these controls because that seemed to make sense for such a filter control.
I've encountered three problems. When I navigate to report, the initial state of these controls is like this:
First thing is that the dates seem very confusing. Today is 2nd of november and the default from
date looks to be after the to
date. It seems weird.
The second problem is that the controls start initialized to today. This makes their use in report filtering awkward, because usually you want to start without the filter, where-as here the filter makes sure that there is 0 rows left. To see any rows, the user must first unset these controls when they enter the report.
The third problem is that the values cannot be unset. If I click the control and click Clear
button, I get this error in JS console:
js-joda.js:6244 Uncaught E {message: "Text '' could not be parsed at index 0: , at index: 0", stack: "DateTimeParseException: Text '' could not be parse…ljs-runtime/com.fulcrologic.fulcro.dom.js:504:97)", parsedString: ƒ, errorIndex: ƒ, toString: ƒ}errorIndex: λ[]message: "Text '' could not be parsed at index 0: , at index: 0"parsedString: λ[]toString: λ[]stack: "DateTimeParseException: Text '' could not be parsed at index 0: , at index: 0\n at DateTimeFormatter._parseToBuilder (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:316:261)\n at DateTimeFormatter.parse2 (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:315:25)\n at DateTimeFormatter.parse (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:314:119)\n at Function.LocalDate.parse (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:429:18)\n at Function.eval [as cljs$core$IFn$_invoke$arity$1] (http://localhost:3000/js/main/cljs-runtime/cljc.java_time.local_date.js:197:28)\n at eval (http://localhost:3000/js/main/cljs-runtime/com.fulcrologic.rad.type_support.date_time.js:1034:80)\n at f64405 (http://localhost:3000/js/main/cljs-runtime/com.fulcrologic.rad.type_support.date_time.js:1040:3)\n at Object.com$fulcrologic$rad$type_support$date_time$html_date__GT_inst [as html_date__GT_inst] (http://localhost:3000/js/main/cljs-runtime/com.fulcrologic.rad.type_support.date_time.js:1044:16)\n at eval (http://localhost:3000/js/main/cljs-runtime/com.fulcrologic.rad.rendering.semantic_ui.controls.instant_inputs.js:29:58)\n at ctor.eval [as onChange] (http://localhost:3000/js/main/cljs-runtime/com.fulcrologic.fulcro.dom.js:504:97)"[[Prototype]]: DateTimeParseException
at createErrorType (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:2:85)
at eval (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:41:286)
at eval (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:1:187)
at Object.shadow$provide.module$node_modules$js_joda$dist$js_joda (http://localhost:3000/js/main/cljs-runtime/module$node_modules$js_joda$dist$js_joda.js:1:298)
at Object.shadow.js.jsRequire (http://localhost:3000/js/main/cljs-runtime/shadow.js.js:34:18)
at Object.shadow.js.require (http://localhost:3000/js/main/cljs-runtime/shadow.js.js:59:20)
at eval (http://localhost:3000/js/main/cljs-runtime/java.time.js:2:56)
at eval (<anonymous>)
at Object.goog.globalEval (http://localhost:3000/js/main/main.js:577:21)
at Object.env.evalLoad (http://localhost:3000/js/main/main.js:1670:12)
DateTimeFormatter.parse2 @ js-joda.js:6244
DateTimeFormatter.parse @ js-joda.js:6219
LocalDate.parse @ js-joda.js:8510
eval @ local_date.cljc:37
eval @ date_time.cljc:330
f64405 @ date_time.cljc:330
com$fulcrologic$rad$type_support$date_time$html_date__GT_inst @ date_time.cljc:328
eval @ instant_inputs.cljc:23
eval @ dom.cljs:167
callCallback @ react-dom.development.js:3946
invokeGuardedCallbackImpl @ react-dom.development.js:3995
invokeGuardedCallback @ react-dom.development.js:4057
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4071
executeDispatch @ react-dom.development.js:8244
processDispatchQueue @ react-dom.development.js:8276
eval @ react-dom.development.js:8300
eval @ react-dom.development.js:22397
batchedEventUpdates @ react-dom.development.js:3746
dispatchEventForPluginEventSystem @ react-dom.development.js:8508
attemptToDispatchEvent @ react-dom.development.js:6006
dispatchEvent @ react-dom.development.js:5925
exports.unstable_runWithPriority @ scheduler.development.js:647
runWithPriority$1 @ react-dom.development.js:11277
Internals.Events @ react-dom.development.js:22414
dispatchDiscreteEvent @ react-dom.development.js:3757
react-dom.development.js:4092 Uncaught E {message: "Text '' could not be parsed at index 0: , at index: 0", stack: "DateTimeParseException: Text '' could not be parse…ljs-runtime/com.fulcrologic.fulcro.dom.js:504:97)", parsedString: ƒ, errorIndex: ƒ, toString: ƒ}
processDispatchQueue @ react-dom.development.js:4092
eval @ react-dom.development.js:8300
eval @ react-dom.development.js:22397
batchedEventUpdates @ react-dom.development.js:3746
dispatchEventForPluginEventSystem @ react-dom.development.js:8508
attemptToDispatchEvent @ react-dom.development.js:6006
dispatchEvent @ react-dom.development.js:5925
exports.unstable_runWithPriority @ scheduler.development.js:647
runWithPriority$1 @ react-dom.development.js:11277
Internals.Events @ react-dom.development.js:22414
dispatchDiscreteEvent @ react-dom.development.js:3757
Seems like the component cannot handle empty values.
(defn render-container-layout [container-instance]
(let [{::container/keys [children layout]} (comp/component-options container-instance)]
;;; ...
- (render-cls id cls))) (container/id-child-pairs children))))))))
+ (render-cls id cls))) (container/id-child-pairs container-instance))))))))
Because of this bug, the current implementation does not render anything unless co/layout
is specified.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.