Comments (3)
Proposal:
/* Version 5 upgrade summary:
* Drop tables activity and creator to allow better naming and integer primary key.
* thanks: 'creator' key (which was the url of a creator) replaced by creator_id
* donations: 'url' key (which was the url of a creator) replaced by creator_id
* creators: 'url' becomes multi-valued
*/
db.version(5).stores({
activity: null,
activities: '++id, &url, title, duration, creator_id',
creator: null,
creators: '++id, *url, name, ignore',
thanks: '++id, url, date, title, creator_id',
donations: '++id, date, creator_id, weiAmount, usdAmount',
});
Things to discuss:
- Do we really need indices for the creator URLs (I think we probably don't)
- Now that we allow multiple urls, which should we take people to when they click the creator
- How will we represent addresses? These probably don't need to be indexed and thus won't be part of the specified schema but it needs to be decided on. I propose simply:
{
ethereum: 0xbD2940e549C38Cc6b201767a0238c2C07820Ef35,
}
I'm not sure if the same logic really applies to bitcoin for instance, since bitcoin addresses should be considered single use...
from thankful.
@ahnlabb about your questions:
- What exactly do you mean here? But yeah order doesn't matter.
- Personally I don't get much value from being sent to their "homepage". If I'm clicking on/around a creator it's because I can't remember what I watched/read from them, and in that case, taking me to their homepage doesn't help much. I think the simplest solution is to, on click, show the associated activity, and in turn, clicking an activity takes me to the activity's url (like it does currently). Of course list the creator urls somewhere.
- Looks good. And we'll worry about bitcoin when we get to that.
Otherwise both comments LGTM!
from thankful.
- Order? What I mean is that indexing takes up space and time when storing a creator. The keys specified in the schema will all be indexed. We can store URLs for every creator by without specifying them in the schema. The only reason to specify them as keys is if we want to retrieve them sorted or search them.
- Might be a good idea, however it's probably not the behavior I'd expect.
- 👍
from thankful.
Related Issues (20)
- Correctly calculate amount to donate when creators have missing addresses (or amounts below threshold)
- remove Gratipay from Readme HOT 4
- add a license HOT 2
- Move things around in UI for better UX HOT 1
- Show estimated transaction costs at checkout HOT 1
- Add step to turn off Metamask privacy mode in onboarding
- Minimize transaction fees by using a multi-output contract
- Make some tables dense
- Store network ID in the donation history
- Make donation history look up creators by address instead of id
- Redistribute funds allocated to address-less creators
- Move wallet setup onboarding step to before checkout
- Automatically recurring donations
- Build creator directory website
- Apply for this grant? HOT 2
- Get Mozilla to republish the latest Firefox version HOT 1
- Add on button error
- Thankful Revival HOT 2
- Cooperation with Smartlike
- Does not detect metamask HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thankful.