OfficeDev / script-lab-2017

[Archived. This is an older version that's no longer maintained. See https://github.com/officedev/script-lab instead]
https://aka.ms/scriptlab
MIT License
219 stars 60 forks source link

Order of my snippet list and suggestion for adding a timestamp to the list entries #387

Open maninweb opened 7 years ago

maninweb commented 7 years ago

Hi there,

while playing with Script Lab, I noticed that my snippet list seems to have an order, but I can not follow its logic - meaning I don't know, if it is ordered by a date or something else. Since using Script Lab, I have created a lot of snippets.

I know which snippets I last accessed and modified, but these ones do not appear on top. For example, in the list below, I created the green highlighted snippet two days ago. Yesterday, I was working on it and also saved it locally and on a Gist. The "Get Languages" entry is one of my first scripts, created much more days ago and not changed since then. So, why it does appear above the green highlighted entry?

2017 04 28-09 51 52

When I hover with the mouse over one entry, there is a tooltip showing when the script was lastly updated. This is helpful, but I have to hover the entries and the text is relative in days/hours and does not show the exact time.

Therefore, I would like to suggest to add a date and timestamp for example at the right side of each entry, so that I can quickly see when it was created and/or changed. If it will possible to sort the snippet list by the creation or last change date/time, this would be additionally very helpful too, I think.

Best, Mourad

Zlatkovsky commented 7 years ago

Thanks for the suggestion. We had this before as well, as https://github.com/OfficeDev/script-lab/issues/14. Closing the other one as duplicate of this one, since this has more details.

@jakobpn , if you want to come up with a final design and assign to me, that would be great. I think there are two elements here: one is about the timestamp always showing (in relative form or in date form? and based on last modified or originally-created?) and one is about having a dropdown (sort by name, creation date [ascending + descending], and last-modified [ascending + descending])

Personally I would be inclined to do the dropdown first and see if that is sufficient -- otherwise I worry about too much screen clutter. But I'll let you decide.

NOTE (to you, and to self when implementing): Whatever we do here, we should presumably replicate it for "My Gists" and for the gallery view in the runner.

jakobpn commented 7 years ago

@Zlatkovsky I agree with you that we should start with the sort/order by drop down.

Adding @danielmgalan. Daniel, do we have a pattern for how to add a sort/order by control to a list in a task pane add-in?

danielmgalan commented 7 years ago

@Zlatkovsky For now, can we also merge #118 with this issue.

Zlatkovsky commented 7 years ago

@danielmgalan , sure, feel free to merge anything you want. And then close the merge one.

Could you describe here what you think the concrete action items are, and what they should look like? Thanks!

danielmgalan commented 7 years ago

@Zlatkovsky et al, Sorry for the late reply on this thread. I have been talking to Jakob and looking into this issue. As we have said previously, this issue has been brought up previously and was postponed to be addressed post release.

It seems like we should implement a modified version of the Inbox list Fabric component since it already allocates a time stamp for short and long time spans.

Look at the attached image to see a UI recommendation for the snippet list: Noticed that this design accounts for sorting controls by name and modification recency. scriptlab_timestamp_artboard 58

Zlatkovsky commented 7 years ago

@danielmgalan , could you give me a link to the Inbox List component? I don't see it on http://dev.office.com/fabric#/components/...

danielmgalan commented 7 years ago

Right, @Zlatkovsky I forgot to include the link. It should be the third variant under the List component: http://dev.office.com/fabric#/components/list

Under the subtitle "Fixed list of 5000 email tiles"

Zlatkovsky commented 7 years ago

The fabric-js (non-react) version: https://dev.office.com/fabric-js/Components/List/List.html