Обсуждение: [pgadmin-hackers][Patch] Change alert styling
Hi Hackers,
In this patch we are introducing SCSS that we generated for the style guide.
The patch is split into 2 files:
- 01-add-scss-building-to-webpack.diffIn this file we add the compilation of SCSS into CSS to webpack
- 02-change-alert-messages.diff
In this file we create a Wrapper for Alertify's success and error function so we can introduce new styling on them. We change all the places in the app where alertify.success, alertify.notify (with the type 'error' or 'success') and alertify.error are called.
Thanks
Sarah & João
Вложения
Hi
--
On Wed, Jun 28, 2017 at 4:40 PM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Hackers,In this patch we are introducing SCSS that we generated for the style guide.The patch is split into 2 files:- 01-add-scss-building-to-webpack.diff In this file we add the compilation of SCSS into CSS to webpack
Are you committing to migrating all the main CSS to SCSS? Whilst I can see the advantages of SCSS, I don't want to end up with a mix and match mess of the two (though, I'd be fine with keeping the smaller, module-specific CSS if it doesn't make sense to migrate it).
- 02-change-alert-messages.diffIn this file we create a Wrapper for Alertify's success and error function so we can introduce new styling on them. We change all the places in the app where alertify.success, alertify.notify (with the type 'error' or 'success') and alertify.error are called.
What is the advantage of this over simply overriding the existing styles?
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi!
Are you committing to migrating all the main CSS to SCSS? Whilst I can see the advantages of SCSS, I don't want to end up with a mix and match mess of the two (though, I'd be fine with keeping the smaller, module-specific CSS if it doesn't make sense to migrate it).
It makes more sense to switch the CSS over as we need it and change the classes to be using the correct variables and nest them appropriately.
What is the advantage of this over simply overriding the existing styles?
We can't simply override the styles because we are adding an icon to the alert. So since we have to add a wrapper anyway we decided to style it like we normally would.
Thanks,
João & Sarah
On Wed, Jun 28, 2017 at 8:51 PM, Dave Page <dpage@pgadmin.org> wrote:
HiOn Wed, Jun 28, 2017 at 4:40 PM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Hackers,In this patch we are introducing SCSS that we generated for the style guide.The patch is split into 2 files:- 01-add-scss-building-to-webpack.diff In this file we add the compilation of SCSS into CSS to webpackAre you committing to migrating all the main CSS to SCSS? Whilst I can see the advantages of SCSS, I don't want to end up with a mix and match mess of the two (though, I'd be fine with keeping the smaller, module-specific CSS if it doesn't make sense to migrate it).- 02-change-alert-messages.diffIn this file we create a Wrapper for Alertify's success and error function so we can introduce new styling on them. We change all the places in the app where alertify.success, alertify.notify (with the type 'error' or 'success') and alertify.error are called.What is the advantage of this over simply overriding the existing styles?--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
OK, thanks - patch applied.
Note to all hackers: As we modify our override CSS moving forwards, it should be migrated to SCSS, and use the defined colour variable names.
Thanks.
On Thu, Jun 29, 2017 at 2:25 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi!Are you committing to migrating all the main CSS to SCSS? Whilst I can see the advantages of SCSS, I don't want to end up with a mix and match mess of the two (though, I'd be fine with keeping the smaller, module-specific CSS if it doesn't make sense to migrate it).It makes more sense to switch the CSS over as we need it and change the classes to be using the correct variables and nest them appropriately.What is the advantage of this over simply overriding the existing styles?We can't simply override the styles because we are adding an icon to the alert. So since we have to add a wrapper anyway we decided to style it like we normally would.Thanks,João & SarahOn Wed, Jun 28, 2017 at 8:51 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 28, 2017 at 4:40 PM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Hackers,In this patch we are introducing SCSS that we generated for the style guide.The patch is split into 2 files:- 01-add-scss-building-to-webpack.diff In this file we add the compilation of SCSS into CSS to webpackAre you committing to migrating all the main CSS to SCSS? Whilst I can see the advantages of SCSS, I don't want to end up with a mix and match mess of the two (though, I'd be fine with keeping the smaller, module-specific CSS if it doesn't make sense to migrate it).- 02-change-alert-messages.diffIn this file we create a Wrapper for Alertify's success and error function so we can introduce new styling on them. We change all the places in the app where alertify.success, alertify.notify (with the type 'error' or 'success') and alertify.error are called.What is the advantage of this over simply overriding the existing styles?--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company