computablelabs / ffa-frontend Goto Github PK
View Code? Open in Web Editor NEWClient for the Computable FFA Market
Client for the Computable FFA Market
Let's have Travis consider linter failures as a build error.
Assuming that an upload succeeds a candidate will be created. This creates a number of getters that are necessary for showing the user the state of said candidate
We'll break out vote
into a separate ticket so it may be that all the candidate issues belong there...
Identify all Vue components and Vuex modules that need a refactor:
We need to flag every class that needs to have methods pulled out into a separate pure function container class, basically just a module with funs.
So that's anything in a module that isn't a: Vuex state attribute, Vuex mutation, Vuex action mutation, Vuex getter.
Put the list here in the convo of the issue.
References #67
Re #5 bullet 1
It is irrelevant that .../new
may redirect to here. We may choose to not do that...
anyway
see #10 pertaining to listing
vs candidate
If it is decided that .../listing/hash
shows the candidate (the listing as candidate:true or something).
@thirtyaughtsix in my opinion this "page" is where the dapp can query for the state of the listing/candidate in question. There are a couple of ways to do this
false
until it is voted in.candidate
. again see #10transactionHash
this could be kept and then used to query the blockchain with. If this is the case, more questions arise about the keeping of these beyond the page lifecycleSubject says all...
Put in a preliminary implementation for at least the flash messages.
Both upload and list have two processing steps. Status should reflect these. We probably want to replace the percentage circle thing with a spinner but we'll that up to Reid.
The foo.all
type endpoints are going to have to use getPastEvents
and grep those logs for Application
. Build the plumbing to fetch and parse this data so that UI/UX can be built after.
See #11
Let's move StartListingButton
from FileMetadata
to the ListDrawer
.
That means ListDrawer
will need two states:
The question is gonna be should this be handled in ListDrawer
(I believe that's correct) or by fiddling with the Vue slot in Drawer
that ListDrawer
occupies.
What protocol methods do we care about for the the upload? If we are focused solely on the uploaded asset itself likely this is just
listingContract.list
Need to figure out how we want to generate the listingHash
and what exactly it is we are hashing
See #8
The FileUploader should subclass a generic DatatrustClient class.
Use the list from #73 and refactor each Vue component. One component -> one PR.
New funs should be pure so they can be static. Let's create a new top level folder called @/functionModules
. Component function modules probably belong in @/functionModules/components
while Vuex modules probably belong in @/functionModules/vuexModules/
.
Don't forget to add specs!
A user can support a market using a web browser and Metamask
Assume:
User can then:
https://.../support
Reserve.getSupportPrice
)EtherToken.deposit
)EtherToken.approve
)Reserve.support
)Reserve.Supported
event)This is an agile style "vertical slice" to force us to integrate browser + metamask + protocol into a functioning prototype. It deliberately excludes features that we will probably want for a public launch, including CSS.
A user can create a listing candidate using a browser + Metamask
Master ticket complete when:
Assume:
User can then:
https://.../new
which creates a listing hash and redirects to https://.../listing/<listhash>
Listing.list
)This will tie directly to the Web3 card Rob will submit shortly.
Essentially the Listing HOC from computable.js should be encapsulated in the Web3 vuex module.
There is a skeleton Listing
class under models/protocol
. Probably ok for it to stay there but the pattern of how the eth_sendtransaction
methods are called needs a rethink based on what we know about MetaMask.
Referencing #5 bullet 1
See #8
The ListingCreator should subclass a generic ProtocolClient class.
...and move the title in use logic to the module.
Re: #5 bullet 1 and bullet 6
Looks like we're missing license
:
if not request.form.get(item):
api.abort(400, (constants.MISSING_PAYLOAD_DATA % item))```
Should also remove any extraneous params we're sending like `originalFilename`.
How do we want to handle sass per component?
Need to change css to prevent FIle Uploader from creeping down with new rows of tags.
The most basic - is there an account ready to be used?
A user can buy and then download a listing’s data using a browser + Metamask
Assume:
User can then:
https://.../listing/<hash>
to see the listing’s detailsNotes
Create a Tab component and then wire it into FileUploader. Apparently there isn't any UI for this.
There should be a text field for input. We'll may/mayn't add auto-complete later.
Enter in the text field adds a new tag rendered somewhat pill like in a div below the text field. Pill should render a delete x on hover - use a font awesome icon for this.
Probably need to add an Add button next to the text field for people who don't understand how the return key works.
The more interesting questions are around what the tagging vuex module looks like and how that gets wired into UploadModule.
The title field should default to the filename when files are dropped in FileUploader. This was working before.
Can we use MM to sign/approve/send etc...?
github wasn't able to auto-generate a repair PR :(
A lot of stuff can just be moved to a Constants or Strings file. I like to use string interpolation so that might be worth thinking about (course i can just do
somePath = `${Constants.foo}/${Constants.bar}`
.
We really shouldn't spend a lot of time on this.
Add an option in Flash like unique: boolean
and prevent unique Flashes with the same messages from being added to the module.
Gah. It's requiring semicolons...
Once an upload has been completed and a listing applied for it will be time to care about voting
SETTER
GETTERS
others?
The foo.all
type endpoints are going to have to use getPastEvents
and grep those logs for Application
. Build the plumbing to fetch and parse this data so that UI/UX can be built after.
See #10
Identify all Vue components and Vuex modules that need a refactor:
We need to flag every class that needs to have methods pulled out into a separate pure function container class, basically just a module with funs.
So that's anything in a component that isn't a: Vue property, Vue data, Vue getter, Vue named event handler.
Put the list here in the convo of the issue.
References #67
Use the list from #74 and refactor each Vuex module. One component -> one PR.
New funs should be pure so they can be static. Let's create a new top level folder called @/functionModules
. Component function modules probably belong in @/functionModules/components
while Vuex modules probably belong in @/functionModules/vuexModules/
.
Use the list from #73 and refactor each Vue component. One component -> one PR.
New funs should be pure so they can be static. Let's create a new top level folder called @/functionModules
. Component function modules probably belong in @/functionModules/components
while Vuex modules probably belong in @/functionModules/vuexModules/
.
Don't forget to add specs!
UI/UX for the start listing button.
There is an important distinction to make about candidates
vs listings
listing candidate
is not an actual listing
until it is voted "in"listing candidate
is simply a candidate
until it is voted "in"Other candidates do exist:
Therefore a UI/UX decision must be made. Does the route ../candidate/hash
and the route .../listing/hash
show the same thing? Or do we choose to show nothing on the listing/hash
for listings which are still in their applicant phase?
NOTE: Other candidates do not have the permanence that listings do. A challenge
or reparam
simply vanish when voting is done...
Create a new Web3Module
vuex module. We'll quarantine Web3 here and also encapsulate the protocol stuff here as well.
First things first, we need to include a Web3 into the project. It needs to be exactly version beta-37
.
One thing to keep in mind (and it has relevance to the class/no-class discussion - and no I ain't talking about the Kardashians): something weird happens in certain contexts whereby the type of the VuexModule
isn't what you expect it to be. Rather than being an instance of your fancy custom subclass of VuexModule
it appeaers to be a decorated version of state
. That means that most of your expectations about this.whatever
are wrong.
The tl;dr is that we need to use external classes to encapsulate logic we want to externalize from methods in any VuexModule
. This probably drives OO purists nuts. Good.
Front end shootout: React, Vue, Angular.
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.