New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #26349 - Create tasks details page in react #425
Fixes #26349 - Create tasks details page in react #425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments inline, rubocop is not too happy about these changes.
webpack/ForemanTasks/Components/TaskDetails/Components/Errors.js
Outdated
Show resolved
Hide resolved
webpack/ForemanTasks/Components/TaskDetails/Components/TaskHelper.js
Outdated
Show resolved
Hide resolved
779ab22
to
2ba59b7
Compare
Fixed the rubocop issues |
2a80bd8
to
865468d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a little bit of testing, encountered a couple of issues. For a task which started at Thu, 13 Jun 2019 09:30:29 UTC +00:00
and ended at Thu, 13 Jun 2019 09:30:42 UTC +00:00
:
- In
Raw
tab, I'm gettingDuration: NaN seconds
- In
Task
tab, all the time fields sayInvalid Date
- When accessing the page, I get this in the console https://gist.github.com/adamruzicka/f5630b0fd1802a655eae83ca6bcf98f0
This changes how the details page looks a tiny bit, it is especially noticeable on non-standard display sizes, see https://imgur.com/a/KCLtclk
865468d
to
629bcee
Compare
@adamruzicka I couldn't reproduce the date issues, can you attach the API data from the task: |
@adamruzicka I loaded all of your data and still didn't encounter this issue, can you maybe re-check? |
629bcee
to
d08aa7e
Compare
Apparently Firefox can't format dd-mm-yyyy date like chrome, and that's the format that Ruby sends. Fixed this and the styling issues, thanks for the help @adamruzicka ! |
When the window is narrow, every other row is right aligned. When the window is wide, the content doesn't cover the entire available space. I'm not saying that's bad, just that it is different from the previous behavior. |
d08aa7e
to
1dbe38e
Compare
Thanks for bringing this to my attention! It looks wrong to me so I changed it and I think it looks better now |
ce92481
to
0aae550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you're looking at a stopped task and turn on auto reload, it keeps refreshing. Before this PR it would refresh once, figure out the task is already stopped and won't change in the future so it stopped reloading.
0aae550
to
ffbd21f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I encountered an odd issue.
- (prerequisite) Have 2 tasks, one which is running and one which is stopped
- Go to tasks index
- Select running task
- Click back in the browser
- Select the stopped task
Actual result: The task renders for a moment, but that is suddenly replaced by data from the running task.
Expected result: The task renders and stays.
I can reproduce it somewhat reliably so if you need any data feel free to reach out to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more things. Also needs a rebase
Hi @MariaAga I'm on Chrome (75.0 on Fedora 30) and I'm also getting the "Invalid date" issue. I think the problem is in In the return new Date(date.replace(/-/g, '/')); It's replacing the timezone offset with a |
0360bfb
to
21d8bf7
Compare
@jeremylenz thanks for noticing! I changed the replace function to only replace twice now (and not all the occurrences) |
21d8bf7
to
f4a29df
Compare
@adamruzicka fixed the odd issue. The problem was that the interval for re fetching the data was set twice but stopped once |
2641936
to
f452ea9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop is not happy. Also can you tell if the failures on travis are related to changes introduced by this PR?
f452ea9
to
07e1c8c
Compare
07e1c8c
to
4814b6d
Compare
failures on travis are unrelated to this PR, and fixed rubocops issues |
4814b6d
to
4e8ce80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and works as expected, ACK
@MariaAga thank you and sorry for the delays. @sharvit, @jeremylenz thank you for testing this |
The reload Button now only re-fetches the task data instead the whole html
The time calculation has slightly changed and now follows http://cldr.unicode.org/ format
wip for: