Closed tomershvueli closed 3 years ago
looks nice :) I realize that this is not the same complexity but would it be possible to also have it as a filter ?😁
looks nice :) I realize that this is not the same complexity but would it be possible to also have it as a filter ?😁
I can try and take a quick stab, but as we both mentioned, the scope is larger than just displaying the updatedAt
value.
@tomershvueli Thanks for the PR, a few things:
updatedAt
for sorting/filtering we'll probably need one anyway. I'm thinking either dayjs or date-fns.@syropian thanks for the response.
updatedAt
since it doesn't really matter?
1a. While here, I was wondering if we wanted to put a standard formatting for Last Updated on the details/Readme view, like so:
Thoughts? Preference on 'standard' formatting?phpunit.phar ./
? I haven't really worked with composer or phpunit much so any input here is welcome. @tomershvueli Oh good point on the archived bit, I forgot about that. One idea I had was condensing the relative time format (and perhaps adding title/aria attributes that contain the full date). I've seen some apps that just format relative like 20s
, 3m
, 6h
, 14d
, 7mo
, 1y
. That might be short enough to avoid the wrapping in 99% of cases.
I do like the idea of also showing the date in the info pane - the styles might have to be tweaked slightly.
For tests, running vendor/bin/phpunit
should suffice.
@syropian Take a look at the latest commit. The short hand notation for updatedAt is in place, as well as in the Readme view.
Unfortunately I'm not sure what's happening with the tests. When I run locally, there's only 1 test that's failing and it's it_can_pass_a_cursor_to_fetch_a_certain_page_of_stars
, which doesn't seem to have to do with the composer file. Can you pull down this branch and try it on your machine?
Another thing to note: I realized that the updated date sometime didn't align with what I saw on the repo - this is due to the fact that updatedAt
is officially anytime anything in the repo has been updated, whereas we could instead bring in pushedAt
for the latest commit to the repo (though this might also not necessarily be in the main branch). What do you think is most appropriate for this value?
this is due to the fact that updatedAt is officially anytime anything in the repo has been updated
Good question, personally the last pushed at date (regardless of branch) makes sense to me.
@syropian agreed! Just pushed up a quick fix for that.
Let me know your thoughts on the tests. I think besides that this PR should be good to merge. I'll work on adding this value to the predicate/filter in a separate branch and PR.
@tomershvueli Thanks! I'll take a peak at the tests issue after I'm done work 👍🏻
@tomershvueli By chance did you run composer update
instead of composer install
when installing the PHP dependencies? Either way, since you didn't make any changes to any composer packages you are probably safe to just back out your changes to composer.lock
to get the tests to pass in CI.
@syropian it's very possible I ran composer update
when I should've run something else. But take a look at the latest commit. I reverted composer.lock to its original contents from before the PR and the tests are still failing :/ thoughts?
@tomershvueli Oh, this is an issue on the master branch, I didn't even notice! I'm ok to merge this, I'll fix the composer issue myself 👍🏻
Master is now fixed as well! The build failures were twofold:
laravel/framework
was not compatible with Composer v2.@syropian awesome! Thanks for the help with the final push - glad it worked. I hope to have another PR soon with Updated At as a value in the Smart Filter, just trying to familiarize myself with Vue a bit :)
Bring in the
updatedAt
attribute for each repo and display it in the dashboard list in a relative format. All tests are passing locally.Eventually it'd be great to add this to Predicates/smart filtering, but that's a bit more of a process since it'll probably need a date picker component, etc.
Screenshot: I purposefully put a screenshot up with an overflow, not sure how we want to handle that, but I think it doesn't look horrible now, especially since it autocorrects itself a bit and doesn't overlap with other objects on the page.