-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#63 - communities page revamp #70
base: master
Are you sure you want to change the base?
Conversation
..Communities.js: - 'your communities' section - sorting button: a-z, z-a, block - communities as flip-cards - scrolling description on back of flip-card ..CommunityPreviewCreator.js: - no more than 1 card at a time - integrated VERC creator - celebratory text on token creation ..FlipCard.js: - new icon - send dynamic css width/height variables to parent element for optional use - return to front on window resize - some global css edits
|
@@ -68,23 +114,43 @@ export default class HabitatCommunityPreviewCreator extends HTMLElement { | |||
this._ctx.canvas.height = h; | |||
|
|||
wrapListener(this.shadowRoot.querySelector('#create'), this.create.bind(this)); | |||
wrapListener(this.shadowRoot.querySelector('#boxleg'), () => { | |||
//flip "create [community]" button to active / inverted color | |||
this.parentElement.parentElement.parentElement.querySelector('#create-community').classList.toggle('active'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A special CSS variable should be used to change visibility. Otherwise this throws If the layout of the dom changes or this element will be used somewhere else.
web/lib/HabitatCommunities.js
Outdated
} | ||
|
||
_userLoad (callback) { | ||
async function _check () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check can be moved to chainUpdateCallback/render
together w/ walletIsConnected
web/lib/HabitatCommunities.js
Outdated
async render () { | ||
const { habitat } = await getProviders(); | ||
|
||
if (walletIsConnected()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be moved to onChainUpdate.
I also not sure if we should hide it by default, this could confuse users looking for a button :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- missing "create" button in the overview page @MaxKaay
I'm thinking - show "create" button by default & prompt user with wallet connection upon pressing, if they aren't connected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is onChainUpdate? Should I add to HabitatCommunities.js, edit in HabitatPanel.js, rollup.js, or something else?
I believe this is the final task I have to complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, its called chainUpdateCallback
in this context
HabitatCommunities.js: - added ghost communities to avoid awkward flex behavior of single-card rows - moved flipcard 'window resize' eventlistener to HabitatCommunities.js as delegated eventlistener - moved portion of render() function to chainUpdateCallback -- called twice in render() to 1) load create button functions immediately, and 2) render all user communities -- looking for a fix (onChainUpdate?) HabitatCommunityPreviewCreator.js: - removed 'create token' event listener after token creation / celebration.
- create button handler moved to constructor - default sorting set
Communities.js: - set default sorting and call this.sort() in constructor - use MutationObserver on creatingCommunity container instead of reaching up DOM tree from CommunityPreviewCreator to invert button color. CommunityPreviewCreator.js: - remove classlist toggle that reaches up DOM tree (see above) - add image scaler to fit image in canvas
..Communities.js:
..CommunityPreviewCreator.js:
..FlipCard.js:
new icon
send dynamic css width/height variables to parent element for optional use
return to front on window resize
some global css edits