Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

tjvsx
Copy link
Member

@tjvsx tjvsx commented Nov 24, 2021

..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

..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
@pinkiebell
Copy link
Contributor

@MaxKaay
Copy link
Member

MaxKaay commented Nov 25, 2021

  • missing "create" button in the overview page

@@ -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');
Copy link
Contributor

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.

}

_userLoad (callback) {
async function _check () {
Copy link
Contributor

@pinkiebell pinkiebell Nov 25, 2021

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

async render () {
const { habitat } = await getProviders();

if (walletIsConnected()) {
Copy link
Contributor

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 :)

Copy link
Member Author

@tjvsx tjvsx Nov 26, 2021

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

Copy link
Member Author

@tjvsx tjvsx Dec 9, 2021

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.

Copy link
Contributor

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

@tjvsx tjvsx marked this pull request as draft December 9, 2021 20:55
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
@tjvsx tjvsx marked this pull request as ready for review December 16, 2021 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants