teamapps-org / teamapps Goto Github PK
View Code? Open in Web Editor NEWTeamApps is a Java web application framework
License: Apache License 2.0
TeamApps is a Java web application framework
License: Apache License 2.0
Table::addColumn
has an int defaultWidth
parameter, that can be used to set the default width of the column. If the client does not guess correctly the length of the header of the column, it might either waste screen space in the better case, or just cut off important text in the worse case.:
This is especially problematic when using localizable strings. There is no way to predict the length of the header for all languages.
It would be great to have a mechanism (i.e. TableColumn::enableDefaultAutoWidth()
), that would calculate the required width based on the length of the supplied column title
and pre-size the column to wrap the header.
The FileField
is actually a Field for a list of files.
This is first of all confusing, since there's no indication of the plurality in the name.
Second, consumers always have to wrap values in a single-valued list when setting the value
.
However, when trying to work with this field in a single-file mode, it gets even worse due to a ternary value state instead of simple null/notnull:
value
is null
, so calling field.getValue()
will return a null pointerfield.getValue()
will return a single-valued List
, so you always have to call field.getValue().get(0)
to get to the actual contents.FileField
, but then removes it. This leads to a situation where the field.getValue()
will return a List
, not null
, but the List
is empty. In turn, one must always check both for nullity of the value and the emptyness of the List
.It would be great if we had two variants of the FileField
:
AbstractFileField<List<RECORD>>
Teamapps has currently 2 enums that represent CSS sizing units: SizeUnit
and FlexSizeUnit
.
While both declare PERCENT
and PIXEL
values, they omit other CSS units, for example: vh
,vw
, em
, etc. See https://www.w3.org/TR/css-values-4/#lengths
Please add support for remaining unit types, and ideally try to unify the separate enums.
When pasting text into a combo-box field it does not trigger any further actions until a key (like backspace) is pressed.
If two views share the same layout position, one cannot control which view should be in the foreground.
Perspective perspective = Perspective.createPerspective();
View alarmTableView = View.createView(StandardLayout.CENTER, MaterialIcon.REPORT_PROBLEM, "Alarm List", null);
perspective.addView(alarmTableView);
View eventTableView = View.createView(StandardLayout.CENTER, MaterialIcon.REPORT_PROBLEM, "Alarm Event Table", null);
perspective.addView(eventTableView);
eventTableView.focus(true);
It would be useful in some scenarios to be able to override browsers' keyboard shortcuts. For example for an "on save" shortcut [CTRL+S]
instead of opening native save dialog an action could be performed in TeamApps.
SessionContext.onGlobalKeyEventOccurred
can already listen for keyboard events, but apparently it will still propagate them to the browser, so hijacking is not possible.
TreeChart:
TreeGraphNode:
org.teamapps.ux.component.window.Window
can be closed with either the ESC
key, via the close button, or simply by clicking outside the window.
Unfortunately, there is no way to intercept this and perform additional actions when closing the window.
Please add an onClose
event hook for this action.
Please add a utility method (e.g. boolean isTainted()
or isChanged()
) on the AbstractForm
so that clients can quickly check whether any user input mutated the fields held in the logical Form.
A method like this can be used to implement logic that handles unsaved changes in a Form in various cases (i.e. a user left the page without saving).
This can be worked around by implementing the check in client userspace code, but should be a part of the standard toolkit.
E.g.:
public boolean isTainted() {
return form.getFields().stream().anyMatch(AbstractField::isValueChangedByClient);
}
Please extend the API of the onSingleRowSelected
Event so that the event payload includes both the new selection and the previously selected one.
This would simplify the "revert" or "undo" scenarios where users may want to go back to their previously selected row in a table. A more specific example of this is when a user is reminded there are unsaved pending changes and selecting a different row would lose them for good. This can be worked around by client code in userspace, but should be a part of the standard toolkit.
Like for styles.
Some time ago the lifecycle methods (e.g. SessionContext#onDestroyed()
) were replaced with public final Event<>
fields.
This breaking API change broke unit tests, that were using mocked SessionContext
.
Since the methods were replaced with a field, mocking the behaviour on lifecycle changes is no longer possible:
when(mockSessionContext.onDestroyed()).thenReturn(new Event<>());
Please add the methods back, or at least allow injecting the final Event
fields by test code.
text input fields do not update their value when something pastes into them that doesn't trigger focus events (some password managers like pass-ff do this).
At least when the according submit button is pressed the current field values shall be used and not their "shadow copies" as this behaviour is unexpected and breaks some things.
Calling ResponsiveFormSection.setVisible(false);
has no effect - the form section is still rendered.
However, the ResponsiveFormSection.setHideWhenNoVisibleFields(true);
works just fine - if there are no fields visible, the section is hidden.
Reproduced on:
0.9.96 & 0.9.101
Please add a Range Slider mode to the NumberField
, or create a separate RangeSlider
Field, that allows for selecting a range of numeric values.
Teamapps already has support for basic sliders via NumberField
, but it's not really possible to compose two NumberFields to produce the desired unified range line with two control sliders.
This is useful in a couple of situations, e.g.:
Currently, whenever an input like this is needed from users, it has to be collected via two separate (Number) fields.
A simplistic example of this can be seen here:
With a live demo available at https://www.cssscript.com/demo/animated-customizable-range-slider-pure-javascript-rslider-js/
A well designed range slider should handle zero-length ranges (e.g. 150 km - 150 km) intuitively, for example by overlaying one slider over another, like in the interactive example. There should also be support in place for open ended intervals (e.g. 15˚C - +∞˚C).
Currently, background images need to get registered before setting. Simplify this...
Please expose either an Event hook or a similar API, that can be synchronously invoked when users close the browser tab or window.
These events can be used to prompt the user to save any pending changes before closing the tab and losing the state for good.
Maybe the beforeunload
window event listener is enough, but care must be taken to make sure the event is propagated to the browser only if confirmed by user interaction.
Alternatively, if this is not feasible, just add a toggle to enable the native browser unsaved changes reminders.
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.