eui
eui copied to clipboard
[Auto refresh] Should auto refresh transform unit?
As a user, I would expect the refresh interval to stick to the unit I have set it. For example: if I set it to 62 seconds, I would expect when I reopen the popover, that it shows 62 seconds again.

I think this is related to #4026, and that the underlying issue is the transformation process into and out of rounded formatting. Definitely worth some investigation.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
@constancecchen You mentioned you may have an update here.
I swear I remember trying to solve this but I don't think I ever did, or that intention was too difficult to figure out. For what it's worth, the relevant code is here:
https://github.com/elastic/eui/blob/037c4ec7f507fbed6df8fcb1cb9f4c8ca1096a4a/src/components/date_picker/auto_refresh/refresh_interval.tsx#L29-L49
We're going to close this issue for the time being. In the mean time, feel free to provide guidelines and specifications on how you see this working in all instances.
Hey! Just to update on this, we've added the ability for consumers/Kibana devs to address this in their individual use-cases with a new refreshIntervalUnits prop. See https://github.com/elastic/eui/pull/7501 for more information.