Skip to content
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

Recent Item accessed date not updating; frequently used solutions falling down the list #37

Closed
JLRishe opened this issue Apr 17, 2020 · 14 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@JLRishe
Copy link

JLRishe commented Apr 17, 2020

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: 0.14.3

Description

Opening a solution from the Recent Items list does not seem to update its Accessed Date or move it to the top of the list. Instead, the Accessed Date remains the same and the solution moves further and further down the list as new solutions are opened.

Steps to recreate

  1. Open any VS solution
  2. Open another VS solution that is not yet on the Recent Items list (alternatively, create a new solution)
  3. Open Start Page+ and click the solution from Step 1 to open it
  4. Open Start Page+ again

Current behavior

The solution opened in steps 1 and 3 remains below the one from step 2 on the Recent Items list. As with the original VS start page, I think it makes sense that solutions would float back to the top of the list as they are opened.

Note: The Refresh button does not seem to have any effect on this ordering.

Expected behavior

The solution from steps 1 and 3 should be at the top of the list.

@yannduran
Copy link
Member

Thank you for reporting this. The method that I'm currently using to populate the recent items list is pulling the items from a registry key and that registry key doesn't seem to get updated during a VS session, only when VS closes.

I've been meaning to look at updating where I pull the items from, but it kind of fell off my radar.

Can you confirm for me that when you close/reopen VS (or restart VS) that the project/solution is in the expected place in the list? Otherwise it's a different issue than what I'm aware of.

@yannduran yannduran added the bug Something isn't working label Apr 17, 2020
@JLRishe
Copy link
Author

JLRishe commented Apr 17, 2020

Thank you for your quick reply.

I tried this, but no luck:

  1. Open VS
  2. Open a solution from Start Page+
  3. Close VS
  4. Open VS

The solution I opened was still in the same place with the same LastAccessed date.

However, I noticed that the LastAccessed date was about 21 days later than the date I installed Start Page+, and I surely would have opened it in that time, which meant that the LastAccessed date must have changed at some point.

So I went to my Source Control Explorer and opened that same solution from there. Then I refreshed the recent items on Start Page+ without closing/reopening VS, and it was at the top of the list with today's date!

Then I tried the same thing on a different solution, this time opening it from the File -> Open dialog, and that one also moved to the top of the list.

So it seems the real issue here is that solutions' LastAccessed properties are not being updated when opening them from the Recent Items list.

@yannduran
Copy link
Member

Ah yes, I remember that part now. That's something else that I need to find a better way to do; opening projects/solutions.

Before replying I opened a project that I hadn't opened for a while, and as you point out the list doesn't get updated, and even a refresh doesn't help. But when I closed VS & re-opened it, the project that I had opened was right at the top of the list where it should be.

  1. Are the dates displaying correctly for you?
  2. What timezone are you using?
  3. When you refresh the list do you lose the period names (Pinned, Today, Yesterday etc)?
  4. Are you using any pinned items?

I'm using the programmatic equivalent of File | Open so I don't know why you're seeing success doing it manually, unless the programmatic way just doesn't update things correctly.

I'm not doing anything in my code to maintain LastAccessed dates etc, I just get that from
VS. Maybe the manual way flushes the values to the registry whereas DTE.ExecuteCommand("File.OpenProject") doesn't.

I did notice in testing that the Start Window doesn't reflect a project opened via Start Page+ either until VS is restarted.

@JLRishe
Copy link
Author

JLRishe commented Apr 17, 2020

Hello again

  1. Are the dates displaying correctly for you?

They are not displaying the date I actually last opened the solutions, but they are surely showing the date when Start Page+ thinks I opened them (i.e. the last open date that was recorded), which in some cases is a date several weeks in the past even though I opened the solution today.

The ordering and period names are consistent with the displayed dates.

They are shown in d-MM-yyyy format.

  1. What timezone are you using?

Japan (UTC+9)

  1. When you refresh the list do you lose the period names (Pinned, Today, Yesterday etc)?

Yes, I do.

  1. Are you using any pinned items?

I wasn't, because I wasn't aware that was an option, but I will now. I can see that pinned items are kept at the top of the list, though the button to toggle the pin doesn't seem to do anything (need to use the pin in the built-in Start Window).

@yannduran
Copy link
Member

Yes, pinning and un-pinning is functionality that hasn't been implemented yet. I have to find how to set the IsFavorite flag.

@yannduran yannduran modified the milestones: v1.1, v1.0 Apr 27, 2020
@yannduran yannduran self-assigned this Apr 27, 2020
@yannduran
Copy link
Member

@JLRishe

Hi Jimmy. I think that the imminent release of StartPage+ v1.0 should address this issue. I don't know how I hadn't noticed, I guess I wasn't paying that much attention to the dates. But as I was testing some new functionality I did see a problem.

I'm so sorry if this has been a huge pain for you.

Btw, pinning/unpinning & removing items is also in the v1.0 release. See the v1.0 Milestone page for details of what else is in there. Plus a number of things from my own personal backlog.

@yannduran yannduran modified the milestones: v1.1, v1.0 May 27, 2020
@JLRishe
Copy link
Author

JLRishe commented May 28, 2020

That's great! Thank you!

@MagicAndre1981
Copy link

@yannduran

works partially in 1.0 , when I close a solution what was not pinned or opened before, I had to click "refresh".

@MagicAndre1981
Copy link

@yannduran

works partially in 1.0 , when I close a solution what was not pinned or opened before, I had to click "refresh".

this should go away once autoclose/reopen is implemented as the data get loaded again when page is shown, correct?

@yannduran
Copy link
Member

No, tool windows don't work like that. When a tool window is "closed", Visual Studio just hides it. When you request the window again, it's the same window instance as before.

Without something like an auto-refresh timer, the only way for the data to be refreshed is to click Refresh.

@MagicAndre1981
Copy link

Without something like an auto-refresh timer, the only way for the data to be refreshed is to click Refresh.

ok, this case internally refresh it after closing a solution (autoclose/reopen)

@yannduran
Copy link
Member

You need to add new issues for things like this André (or add it to an existing one if it's relevant). Otherwise the discussion can get lost in an issue that has nothing to do with the suggestion.

@MagicAndre1981
Copy link

@yannduran 1.01 loses the pin state and doesn't show correct last usage time.

@yannduran
Copy link
Member

First off, André could you please open a new issue for this. This issue was closed on May 28. And could you please describe the steps that lead to this result in that new issue?

It's almost midnight here now, so I'll look into it further tomorrow, but a quick test shows that the pin status didn't get lost after closing and re-opening VS.

I'm not sure what you mean by:

doesn't show correct last usage time

Are you saying that it used to show the last opened date correctly, but now doesn't?

Please don't answer the questions here in this issue, but address them in your new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants