-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature/notification reworked design #66
Feature/notification reworked design #66
Conversation
Thanks @erikyo I will work on reviewing it over the course of this week. |
-renamed settings.html to settings-content.html because i've got some issue with duplicated filenames
@Sephsekla from my POV this looks good. If you have time to look this over, please do. Alternatively, if you don't have time for a full review, it would be helpful to compare what you've done to this PR, and confirm that if we merge this, it compliments your work. From what I can see the folder structure is slightly different, in that you've built your work on the notification-hub directrory, and this PR builds everything in the docs directory. I just want to make sure we've not lost anything important you included in your branch. |
@erikyo thanks for your patience here, it's been a busy few months. So, I have a few things I'd like to see if we can get implemented into this PR, in order to make it more easily "testable" by end users.
If we could make those changes, it makes it easier to share this as an installable plugin, which users can install and test. Let me know if you need any help with any of these items. |
All clear but I just have one small question:
Where i have to register the custom Admin menu in the wp-notify plugin (here?). Let me know! |
@erikyo for now, I suggest we just add the admin menu procedurally to the main wp-notify.php file. This admin menu will be removed when we actually develop the notifications functionality, it's just to allow folks to install and see this in action, and hopefully generate some interest. |
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.
Thanks for all the hard work here, this has really got things moving again!
I haven't yet tested it out, so just a general scan of the code, but I've added a few comments and suggestions. Some are really nit-picky, but I've just added things that have come to mind as I've read through.
let title = document.getElementById('title').value; | ||
let content = document.getElementById('content').value; | ||
|
||
var div = document.createElement('div'); |
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.
Ditto this can be a const
, since we're just mutating properties, rather than ever setting it again.
|
||
#wpadminbar .wp-notification.unread >:first-child:before { | ||
top: calc(50% - #{$bullet-width * .5 }); | ||
left: #{ -24px * .5 - $bullet-width * .5 }; // 9 - left padding - border /2 + bullet/2 |
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.
These seem really fiddly, I'm wondering if there's a clearer way to handle the variables etc here.
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.
I honestly don't know how to solve it here, but it can be simplified with #{ (-24px - $bullet-width) * .5 }
/* | ||
* General notifications style | ||
*/ | ||
.wp-notification { |
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.
I'm conscious we have styles for the individual notifications in both this file and the hub file - not necessarily a bad thing but I do wonder if it could be slightly unclear for future maintenance.
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.
I removed from here all the css properties apart from colors and lettering (which are indeed shared between the two types of notifications), tell me if this is an acceptable solution for you.
@@ -0,0 +1,188 @@ | |||
const isProduction = process.env.NODE_ENV === 'production'; |
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.
I'd maybe split this file out and import a couple of things, but that's a matter of personal preference more than anything.
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.
here the issue was solved because webpack is no longer used as long we don't need no more the dev server 😉... checkout at this branch where I am integrating this style (with all your suggestions)
@@ -0,0 +1,50 @@ | |||
<div class="wp-notification wp-notice-alert is-dismissible"> |
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.
Given you've already got the html <include>
setup for use elsewhere, what do you think about splitting these out into smaller files in a subfolder and including them? Just for the purpose of keeping things as modular as possible and easy to see what's what.
Feature/notification Design implementation (follow-up of #66)
Superceeded by #67 |
Folder structure:
includes/ui/notification-hub/assets - The work folder
assets/html - here you will find the notices and the sidebar html
assets/script - here for now you will find some scripts that has only the function to test the ui
assets/css/notify.scss - the WP-Notify style (this plugin css)
assets/css/wordpress.scss - The WordPress Admin style (will not be included in the future, but at the moment is needed for ui testing purpose)
img/ - actually there is the favicon (without that there is an error in console)
includes/ui/notification-hub/dist - Build folder