erdo / n8 Goto Github PK
View Code? Open in Web Editor NEWstate based navigation library
License: Apache License 2.0
state based navigation library
License: Apache License 2.0
There are a few button labels in the sample app that say "...(or exit)".
If the user is automatically navigated back beyond the end of the navigation graph, the user does not exit, the user is left on the home location
the label "(or exit)" should be removed
Something like NOT PRODUCTION READY or whatever, a few emojis maybe ๐ง๐
the section https://github.com/erdo/n8?tab=readme-ov-file#some-ideas-for-what-to-do-next needs a little tidy, some items can be removed:
those have both been done
N8 needs a logo! if no-one volunteers one, it's going to be a crap one drawn by me
Works fine for a simple linear backStack, but the implementation and tests need to be finished to work from inside tabhosts (the sample app exhibits the problem at the moment)
The serialization code can be taken from https://github.com/erdo/persista
the key lines we'd need are:
val jsonText = json.encodeToString(serializer(stateKType), item)
json.decodeFromString(serializer(stateKType), jsonText) as NavigationState<L, T>
Code samples / comments are messed up in TabHost navigation section https://github.com/erdo/n8?tab=readme-ov-file#tabhost-navigation
the code comment part has not been terminated properly
https://repo1.maven.org/maven2/co/early/n8/n8-core/
doesn't contain all the files it should, wait a few hours as it could just be maven central being slow, if they don't appear will need to contact sonatype as this is the first version released, maybe there is some config issue. might need to try a version 0.0.2
most of the test files don't actually mock anything but still feature the line: MockKAnnotations.init(this, relaxed = true)
NavigationExtensionsTest
, NavigationModelLinearNavTest
& NavigationModelNestedNavTest
This already works for linear navigation graphs (see NavigationModelLinearNavTest
and the tests that refer to setData
), but we need to verify the behaviour for nested navigation graphs, there are some commented out tests in NavigationModelNestedNavTest but they'll need to be re-written.
Consider changing the advice about using plain Strings to identify locations... you still can, but when we send data to locations, the data needs to be kept as part of the location class itself eg:
@Serializable
data class ProductPage(val productId: Int) : Location()
If you used plain Strings to identify your locations eg:
"ProductPage"
You'd need to implement some custom protocal to handle data for example "{locationName}|{data}" eg:
"ProductPage|123"
And your UI code would have to parse that (rather than just doing location.productId
)
...OK I've considered it ๐ฌ let's just mention that in the docs where we say you can use String to identify locations and gently encourage people not to do that unless they understand the implication and have some good reason, can link them to this issue
Since more recent versions of gradle, the source code jars are not being downloaded even if they are present in the Maven repo, so they are not available in Android Studio.
This is because at some point I added support for gradle's module format (example) as well as continuing support for maven's older pom format (example).
The module file created by the build does not reference the source files (even though they are present in the repo, example)
This has become a problem with the recent gradle versions that refuse to download source files unless they are explicitly listed in the module file
more info here: https://issuetracker.google.com/issues/329877056
So we need to update the publishing build files. This can be worked on locally by running ./gradlew publishToMavenLocal
and then checking the result in the hidden directory: .m2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.