Skip to content

Commit 458f9d7

Browse files
committed
Some further observations from logs, including Lazy Plugin Loader
1 parent 81d0a1c commit 458f9d7

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

docs/tech/initial-auto-sort-and-notifications.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,29 @@ Additional remarks:
3535

3636
## Design
3737

38-
0. Before all, capture the sequences of key execution points and events (related to #161)
38+
Before all, capture the sequences of key execution points and events (related to #161)
3939

40-
1. Fine-grained recognition of states of involved elements:
41-
- non-epmty sorting spec present or not?
42-
- sorting spec parsed successfully, hence ready to be applied?
43-
- File Explorer view available?
44-
- patchable?
45-
- lazy view?
46-
- plugin load time?
47-
- ...
40+
Log below shows some unexpected edge cases and sequences of events, e.g. Lazy Plugin Loader, when
41+
the metadata-cache-populated event never reaches the plugin
42+
43+
Is it possible / feasible to both:
44+
- handle the optimistic scenario of auto-sorting on start on the first display of File Explorer? AND
45+
- gracefully handle the delayed scenario, e.g. Lazy Plugin Loader or for whatever reason?
46+
47+
The delayed scenario, should be handled with a popup and explicit user confirmation
48+
- can this scenario be indeed correctly recognised and not confused with other scenarios
49+
in which the automatic sorting should not be applied?
4850

4951
---
5052
Log
5153

5254
Things turn out to be trickier than I expected.
5355

5456
Sample logs generated by current log-decorated version:
57+
5558
```
5659
Scenario: File Explorer hidden on close, automatically hidden on start:
57-
On end: File Explorer invisible, ribbon indicated 'sorting not applied'
60+
On end: File Explorer invisible, ribbon indicated 'sorting not applied, enabled'
5861
c-s ep: (b pre-1) entered patchFileExplorerFolder()
5962
c-s ep: (a pre-1) entered checkFileExplorerIsAvailableAndPatchable()
6063
c-s ep: (a pre-2) this.getFileExplorer ok
@@ -117,3 +120,15 @@ c-s ep: (f) patched getSortedFolderItems invoked!
117120
c-s ep: (f) patched getSortedFolderItems invoked!
118121
```
119122

123+
```
124+
Scenario: FE visible, sorting enabled, custom-sort plugin delayed via Lazy Plugin Loader
125+
On end: File Explorer visible and not sorted, ribbon indicates 'sorting enabled but not applied'
126+
127+
c-s ep: (b pre-1) entered patchFileExplorerFolder()
128+
c-s ep: (a pre-1) entered checkFileExplorerIsAvailableAndPatchable()
129+
c-s ep: (a pre-2) this.getFileExplorer ok
130+
c-s ep: (a pre-3) has requestSort()
131+
c-s ep: (a) 1.6.0+ and has getSortedFolderItems()
132+
c-s ep: (f pre-1) patched getSortedFolderItems factory!
133+
c-s ep: (b) 1.6.0+ and patched getSortedFolderItems()
134+
```

0 commit comments

Comments
 (0)