Coder Social home page Coder Social logo

montanaflossco / flint Goto Github PK

View Code? Open in Web Editor NEW
630.0 630.0 23.0 2.17 MB

The Flint framework for building apps on Apple platforms using Feature Driven Development

Home Page: https://flint.tools

License: MIT License

Objective-C 0.30% Swift 98.34% Ruby 1.36%
appframework-library apple ios logging macos siri swift tvos watchos

flint's People

Contributors

edwardbetts avatar kokhong20 avatar marcpalmer avatar mtancock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flint's Issues

Add withContextualLogging { ... } to Action, for setting logging on dispatch queue for subsystems

Subsystems that want to participate in contextual logging need access to the loggers and this can be done with adding an argument for the loggers or context, but that is quite invasive to internal APIs.

We should be able to do something like this:

public func withContextualLogging(_ block: () -> Void) {
    let previousActionQueueLogger = action.queue.getSpecific(key: actionQueueLoggerKey)

    action.queue.setSpecific(key: actionQueueLoggerKey, value: request.context.logs.development)
    block()

    // Restore the previous context specific logger
    action.queue.setSpecific(key: actionQueueLoggerKey, value: previousActionQueueLogger)
}

... and add an @objc func FlintContextualLogger() -> Loggers? free function that ObjC can call to get the current logger.

The problem here is that it is never valid to do that even on a serial queue if you are not inside the withContextualLogging block, but this could be a good enough pattern.

Work out how apps can indicate "the last NSUserActivity is no longer valid" for Activities

With automatic activities, e.g. for a Document Open, we need to be able to cancel/resign the current activity when that is no longer the correct activity to advertise.

In this example it would be in the Document Close handling that we'd need to do this. Perhaps a convention of the form cancelsActivity = true would be enough, and that would be defined on the DocumentCloseAction.

However this may tie in with a bigger idea related to endsBreadcrumbTrail = true. Are these the same high level concept? If so maybe we just need a terminatesStack = true property, and we "do the right thing" for both?

Add unified export that captures log entries inline inside action history

This would allow you to see logging from subsystems in place where the action execution occurs, making it much easier to tie things togather.

This would not be in time order, it would be in time order of action but within each action there'd be log entries from later in time, grouped by the action request ID. So you can see which later logging related to a given action via the contextual logger.

Provide a way for apps to re-advertise an Activity when the app/window becomes active again

e.g. a multi-document app on macOS will only advertise one current activity, for the foremost window. When switching windows (activate) they may need to re-advertise their activity (research this in docs). It may be that multi-window paradigms retain but resign their current activity automatically and this is not a problem.

This also happens on iOS where if you switch away from the app and return, it is no longer advertising the current activity

Add support for Action completion to report `.longRunning` and report final completion later

At the moment the dispatcher will log if it takes too long to call completion, however we want to have some safeguard here to save people from forgetting to call completion, which is easily done.

So again look at returning a .longRunning outcome, which must be received quickly, and that will disable the detection of the missing completion, but we still expect it to call completion again later (we don't pass "longrunning" on to the caller") with failure or success.

Look at optional "context" for Action perform, containing dependencies to inject

Using Input to pass in dependencies is not the greatest. The actions have static stateless perform but they need to access dependencies. Using singletons in Action impls makes them annoying to test.

So consider dependencies of type T:Any or similar on Action, and see if we can not have to specify that at all when not relevant

Investigate a `requiredPermissions` convention on ConditionalFeature

Suggested by James Dempsey, this could be used to make features unavailable unless e.g. Photo Library and Camera permissions are granted to the app.

This seems simple enough, but we need to think about what we can do on the other side of it, and whether our checks for status would/should trigger a confirmation alert.

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.