Giter VIP home page Giter VIP logo

extendio's People

Contributors

dependabot[bot] avatar plastikfan avatar

extendio's Issues

Traverse Subtree

Current, filters are defined in the config as a object that sits behind an interface. This form make them impossible to serialise. The config should be changed to represent filters in a serialisable form, so they should be configured with the properties of the filters rather than an object. But we still need to allow for a custom filter. For custom filters, it would be up to the client to implement the corresponding restore functionality for the resume feature.

The complication we have is with the listen feature. We need to accept the listen conditions from the parent and apply it appropriately for the sub tree. All we need to do is ensure we initialise to the same state that the parent was already in and just continue.

In order to do this, we need to persist and restore that listen state.

NB: the navigationListener definition:

type navigationListener struct {
	listen  ListeningState
	states  navigationListeningStates
	current TraverseCallback
}

needs to be refactored a little: listen->state, current->callback

filter not applicable behaviour

If the filter is not applicable to a particular file system node, should that node be invoked or not? If you define a filter which contains a discriminating scope (ie not all nodes), does it not make sense that the callback should NOT be invoked? On first thoiught it seems that this should be the case, but it may not suit all scenarios, so this should become aconfigurable filter behaviour. By default, a filter that is not applicable, will not allow that node to be invoked for.

create xfs/utils package

will initially contains exists functionality. Will be used to contain any file system related util functionality

create traverse 'interfaces'

the term 'interfaces' shouldn't be taken literally, it just means the client interface into the traverse functionality. This can include the options obect the client needs to define subscription.

add IsLeaf notification

Need a notification that indicates that current directory notification represents a leaf directory

add resume

some notes I made:


ROOT:. 💔 (C:\Users\Plastikfan\dev\github\PoSh\Utopia\Elizium.Utopia)
├───.vscode
├───Classes
├───Internal
├───Output
│   └───Elizium.Utopia
├───Public
│   ├───ez
│   ├───fs
│   ├───git
│   ├───loopz
│   ├───qfs
│   ├───rez
│   ├───tools
│   ├───ui
│   └───yank
└───Tests 💔
    ├───Data 💔
    │   ├───Arcadia
    │   │   ├───C
    │   │   │   └───Charli XCX
    │   │   │       ├───aka
    │   │   │       │   └───Charlotte Aitchison
    │   │   │       │       └───Atlantic
    │   │   │       │           ├───Boom Clap
    │   │   │       │           └───How I'm Feeling Now
    │   │   │       ├───Asylum Records
    │   │   │       │   ├───Sucker
    │   │   │       │   └───True Romance
    │   │   │       └───This Is Music
    │   │   │           ├───Nuclear Seasons
    │   │   │           └───Super Ultra
    │   │   ├───P
    │   │   │   └───Plastikman
    │   │   │       ├───aka
    │   │   │       │   └───FUSE
    │   │   │       │       └───Nova
    │   │   │       │           ├───Computer Space
    │   │   │       │           └───Dimension Intrusion
    │   │   │       │               ├───Part One
    │   │   │       │               └───Part Two
    │   │   │       ├───Mute
    │   │   │       │   └───Spastik
    │   │   │       └───Plus8 ➕
    │   │   │           ├───Krakpot
    │   │   │           └───Plastique
    │   │   └───S
    │   │       └───Speedy J
    │   │           └───aka
    │   ├───infexion
    │   └───MUSICO 💔
    │       ├───bass
    │       │   ├───DUB
    │       │   │   ├───Dreadzone
    │       │   │   │   └───Second Light
    │       │   │   └───Leftfield
    │       │   │       ├───Alternative Light Source
    │       │   │       ├───Leftism 22
    │       │   │       └───Tourism
    │       │   └───DUBSTEP
    │       │       └───Katy B
    │       │           ├───Honey
    │       │           └───Little Red
    │       ├───DREAM-POP
    │       │   ├───Cocteau Twins
    │       │   │   └───Heaven Or Las Vegas
    │       │   ├───Kate Bush
    │       │   │   ├───Hounds of Love
    │       │   │   └───The Sensual World
    │       │   └───Tori Amos
    │       │       ├───Little Earthquakes
    │       │       └───Strange Little Girls
    │       ├───edm 💔
    │       │   ├───AMBIENT-TEHNO
    │       │   │   ├───Amorphous Androgynous
    │       │   │   │   └───Tales Of Ephidrina
    │       │   │   ├───Aphex Twin
    │       │   │   │   ├───Classics
    │       │   │   │   └───Selected Ambient Works 85-92
    │       │   │   └───Polygon Window
    │       │   │       └───Surfing on Sine Waves
    │       │   ├───ELECTRONICA 💔
    │       │   │   ├───Orbital 💔 ➕ (current changes 💚)
    │       │   │   │   ├───Diversions
    │       │   │   │   ├───In Sides ❤️ RESUME FROM HERE
    │       │   │   │   ├───Orbital ⭕
    │       │   │   │   ├───Orbital 2 ⭕
    │       │   │   │   ├───Snivilisation ⭕
    │       │   │   │   └───Wonky ⭕
    │       │   │   ├───The Chemical Brothers
    │       │   │   │   ├───Exit Planet Dust
    │       │   │   │   └───No Geography
    │       │   │   └───Underworld
    │       │   │       ├───Beaucoup Fish
    │       │   │       ├───Dubnobasswithmyheadman
    │       │   │       ├───Pearl's Girl
    │       │   │       └───Second Toughest in the Infants
    │       │   └───MINMAL-TECHNO
    │       │       ├───FUSE
    │       │       │   ├───Dimension Intrusion
    │       │       │   └───Train Trac
    │       │       └───Plastikman
    │       │           ├───Closer
    │       │           ├───Consumed
    │       │           ├───Musik
    │       │           └───Sheet One
    │       ├───ELECTRONIC-POP
    │       │   ├───Depeche Mode
    │       │   │   ├───I Feel You
    │       │   │   └───Remixes 81-04
    │       │   └───Traci Lords
    │       │       ├───1000 Fires
    │       │       ├───Control (Single)
    │       │       └───Fallen Angel (Single)
    │       ├───POP
    │       │   ├───Katy Perry
    │       │   │   └───Teenage Dream
    │       │   └───Madonna
    │       │       ├───Bedtime Stories
    │       │       ├───Confessions on a Dance Floor
    │       │       ├───Like a Virgin
    │       │       ├───Madonna
    │       │       │   ├───Covers
    │       │       │   └───Signal
    │       │       ├───Material Girl (Vinyl Single)
    │       │       │   └───Signal
    │       │       ├───MDNA
    │       │       └───Music

💔 = Fractured ancestor, caused by resume

ROOT-PATH: C:\Users\Plastikfan\dev\github\PoSh\Utopia\Elizium.Utopia
RESUME-FROM: C:\Users\Plastikfan\dev\github\PoSh\Utopia\Elizium.Utopia\Tests\Data\MUSICO\edm\ELECTRONICA\Orbital\In Sides

The NET-PATH is RESUME - ROOT: "Tests\Data\MUSICO\edm\ELECTRONICA\Orbital\In Sides"

So from "In Sides", proceed as follows:

  • Iterate-Proceeding:
  • get parent of current: "In Sides"
  • get all siblings of current that proceed current: "Orbital", "Orbital 2", "Snivilisation", "Wonky" => ⭕
  • iterate all following siblings
  • Get Parent "Orbital" (denoted by ➕)
  • current now becomes parent "" 💚
  • invoke Iterate-Proceeding with the new current
  • continue iteration until current = root

add directory walking tests

Just to illustrate how directory walking works using the standard io.fs version of walkdir. Will require the adding of test directory tree.

examine if refactor is required to enable ReadDirectory Hook to be overridden effectively

If a client needs to override ReadDirectory to optimise for performance reasons, the handling of file or folder entries needs to be made clearer. An anticipated optimisation is that to do with stripping out all file entries. Currently, it is thought that the existing design will not correctly allow for this to be done effectively, so an internal refactor may be required.

As a starting point, we can define a new ReadDirectory that only returns folder entries.

Actually, if #47 is implemented, then this refactor issue may be a moot point.

rename api items

Dont implement this until near to release time, as there will probably be more items to addto this list

  • FIlter.Description -> FIlter.GetDescription - actually, use the new get/set paradigm instead
  • FIlter.Source -> FIlter.GetPattern
  • Filter.Name -> Description
  • currentItem -> item
  • change binary based enums (those based on uint32) to be named xxxBiEnum, eg FilterScopeEnum -> FilterScopeBiEnum
  • frame.filters.Compound should be renamed to frame.filters.Children
  • change navigationListener.buildStates to makeStates
  • change property ConstRef to RoRef
  • make (VarProp/constProp).Field internal; this means that properties can now only be created using the factory or New function.
  • rename Construct to New on factories

delete FilterInfo


hook function filenames should be named hook-XXXX.go eg hook-extend.go


change (&nav.NavigatorFactory{}).Create, by defining a package global instance of the factory, so the client can invoke Create with Factory.Create, which is neater.


there are some items which are exported which do not need to be. Note that internal classes with exported methds are ok because required for testing.

add traverse within functionality

Walk a directory tree, but only start invoking the callback, once a certain predicate has been satisfied and then stop when another predicate is satisfied, ie traverse with start-predicate and end-predicate.

Can be implemented by defining a decorator function that wraps the client defined callback. The decorator would be provided with the navigation frame that will help it to determine when to start and stop invoking the client callback.

create navigator class

Need the following items:

  • navigator interface with a Traverse method
  • constructor function which takes functional options as input
  • new options object based on existing options which contains booleans to indicate folder/file traversal, which by default are both set to true
  • just a single options variant (ie the existing ones for file/folder/any is not required)

create resume skeleton

Create the necessary functionality required by the client in order to launch a resume operation. The resume will need to have a way of creating a new blank navigator that will load state from json previously persisted. After the state has been marshalled in, the navigator impl needs to be created and re-initialised according to that state.

Need to also save the current item being processed somewhere in the frame so we know where to resume from next time. That will have to be stored in the marshalled state too.

folders augmented with files mode

When only folders are requested, there may be a need to obtain its file children in a single entity, rather than navigating them. ie we only want the folders, but in this mode, when the client gets called back, there is also a collection property provided that contains the files. We cna also define an alterntive filter speificially for the files.

This means we need to redefine the filter section so it accomodate another filter. (Filters.Current, FIlters.Children)

setup the module

  • init module
  • add standard dependencies (gomega, ginkgo)
  • initial README content

re-arrange options

  • create Notify section to contain OnXXX functions
  • Move IsCaseSensitive into Sort Behaviours

deep copy options

There are multiple generic solutions currently available to achieve this but they are either deficient in some way or do not have a properly tagged and stable released version, therefore this will be done in a specilaised way in-house.

make filters serialisable

Current, filters are defined in the config as a object that sits behind an interface. This form make them impossible to serialise. The config should be changed to represent filters in a serialisable form, so they should be configured with the properties of the filters rather than an object. But we still need to allow for a custom filter. For custom filters, it would be up to the client to implement the corresponding restore functionality for the resume feature.

directory entry navigation order

Allow client t define whether folders or files are navigated first. Add a boolean option (FilesFirst) to SortBehaviours. The default behaviour is the zero value of false, meaning that folders will be navigated first.

persist traversal state

The issue #52 was probably implemented incorrectly. Instead of persisting options, we should have persisted navigation state, where the options are just part of this overall state, so this issue will fix that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.