Comments (5)
The default value and the decrease logic are inherit from the original component that the add-on is based on. I would also expect that the count up never ends if no end time is defined. So how can we make the API less poor? Should we remove the default value in case on countUp or just replace the decrease logic or remove the default value completely from the component?
Any fix would be a breaking change, so let's figure out what makes most sense in this case.
IMHO either there should be no default value (some initial value is needed for count down, but there's nothing special in "60" and users will likely need to set an initial value that is different from 60), and/or there should be an endTime property that applies to count up, so that count up does not end at the so-called "startTime"
from simpletimeraddon.
The "problem" is here
Should the default value for the startTime property be set to some other default when countUp is set?
from simpletimeraddon.
As a user, I would expect that the default value of "startTime" does not affect when the count up ends, and if there is no "endTime", I would expect that the count up does never end. (It does not matter how it is implemented. Having "startTime" act as "endTime", and having that end-time be 60 just because 60 is a reasonable default for count down, is poor API and does not make sense)
from simpletimeraddon.
The default value and the decrease logic are inherit from the original component that the add-on is based on. I would also expect that the count up never ends if no end time is defined. So how can we make the API less poor? Should we remove the default value in case on countUp or just replace the decrease logic or remove the default value completely from the component?
from simpletimeraddon.
At least the demo should make sense, when enabling the count up checkbox the textfield changes to "End time", we could populate it with 60.
from simpletimeraddon.
Related Issues (11)
- Update to Vaadin 14 HOT 1
- add a silent mode HOT 1
- $0.start is not a function error HOT 2
- Improve addCurrentTimeChangeListener documentation
- Make the format customizable
- Display hours with leading Zero
- Release for Vaadin 24 HOT 2
- Handle invalid input in the TextField event listener in SimpletimerDemo
- Timer resets when placed in the com.vaadin.flow.component.tabs.Tabs HOT 1
- Continues requests when timer is running HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpletimeraddon.