Skip to content

Add toasts to UI and PluginApi#194

Closed
zerebos wants to merge 4 commits into
masterfrom
toasts
Closed

Add toasts to UI and PluginApi#194
zerebos wants to merge 4 commits into
masterfrom
toasts

Conversation

@zerebos
Copy link
Copy Markdown
Member

@zerebos zerebos commented May 13, 2018

I also added it to the global bd object for debugging/testing. Also have it popup a toast on setting changed for debugging purposes.

Haven't worked with Vue too much so let me know how bad I fucked up.

Comment thread .travis.yml Outdated
language: node_js
node_js:
- stable
- "8"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try using Gulp v4 with Node.js v10.0.0 and it worked fine. Maybe we should be updating Gulp instead of downgrading Node.js?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that works for me, v4 should be stable enough

@samuelthomas2774 samuelthomas2774 mentioned this pull request Jun 10, 2018
}


/**
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've used a mix of spaces and tabs here (and in other places). Also there should probably be a Toasts object here (as everything else in the plugin API has).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I get for trying to change editor while working lol. I can do toasts as an object

@@ -0,0 +1,31 @@
/**
* BetterDiscord Modals Component
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Toasts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More lazy copy paste

*/

<template>
<bd-toasts>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally custom elements shouldn't be used in Vue as Vue doesn't know exactly what to do with them. If this component was defined globally this would cause an infinite loop.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the toasts by looking at the modals and I believe they used a custom element as well. At least that's how I see it registered in the other file and in the DOM as well.

@@ -0,0 +1,46 @@
/**
* BetterDiscord Modal Component
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Toast.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, lazy copy paste

Comment thread client/src/ui/toasts.js
@@ -0,0 +1,72 @@
/**
* BetterDiscord Modals
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Toasts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another lazy copy paste

samuelthomas2774 added a commit to samuelthomas2774/BetterDiscordApp that referenced this pull request Jul 20, 2018
@samuelthomas2774
Copy link
Copy Markdown

samuelthomas2774 commented Jul 20, 2018

Merged into samuelthomas2774/discord-api.

@zerebos
Copy link
Copy Markdown
Member Author

zerebos commented Jul 20, 2018

Approve of toasts in that fork, closing this.

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.

2 participants