PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Different styles in similar buttons in commands bar

Open govindgoel opened this issue 6 years ago • 23 comments

What did you expect to see that you didn't? ->The ok and cancel button have different UI so this can be changed.

Please show us where to look

https://publiclab.org/post


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

govindgoel avatar Mar 01 '20 09:03 govindgoel

Thanks for opening your first issue! This space is protected by our Code of Conduct - and we're here to help.
Please follow the issue template to help us help you 👍🎉😄
If you have screenshots or a gif to share demonstrating the issue, that's really helpful! 📸 Do join our Gitter channel for some brainstorming discussions.

welcome[bot] avatar Mar 01 '20 09:03 welcome[bot]

can i take up this issue?

Kirti2502 avatar Mar 09 '20 17:03 Kirti2502

@VladimirMikulic Can you approve this issue

govindgoel avatar Mar 09 '20 18:03 govindgoel

@govindgoel We could make pup-up modals more consistent. :+1:

VladimirMikulic avatar Mar 09 '20 18:03 VladimirMikulic

Good catch! We definitely want them consistent!

nstjean avatar Mar 10 '20 13:03 nstjean

@govindgoel @nstjean @VladimirMikulic I want to work on this issue.

NitinBhasneria avatar Mar 19 '20 16:03 NitinBhasneria

Go ahead 👍

VladimirMikulic avatar Mar 19 '20 17:03 VladimirMikulic

@VladimirMikulic I am unable to find the code. Can you help me with the code

NitinBhasneria avatar Mar 20 '20 04:03 NitinBhasneria

@NitinBhasneria there is no code to find, at least in our codebase. It's Woofmark's CSS in node_modules. You need to override it.

VladimirMikulic avatar Mar 20 '20 10:03 VladimirMikulic

@VladimirMikulic I have gone through the problem. The problem is that the insert link pop up "cancel" and "ok" button do not have classes "btn btn-default" included.

NitinBhasneria avatar Mar 20 '20 11:03 NitinBhasneria

Well done. You can inject them with JS.

VladimirMikulic avatar Mar 20 '20 11:03 VladimirMikulic

@VladimirMikulic This is incorrect. The classes are to be updated in the dist/PublicLab.Editor.js file. Specifically, on lines 19788 & 19789 respectively. The update that upholds the DRY principal is to update the code to this:

    cancel: e('button', 'wk-prompt-cancel btn btn-default', 'Cancel'),
    ok: e('button', 'wk-prompt-ok btn btn-default', 'Ok'),

No need to inject them with js.

nicoleiocana avatar Apr 08 '20 15:04 nicoleiocana

@nicoleiocana We don't modify the dist file directly!

VladimirMikulic avatar Apr 08 '20 16:04 VladimirMikulic

You are correct. It was bad for me to assume that the contributors understood where the files existed in the code. I admit my mistake.

We edit the file here:

/PublicLab.Editor/node_modules/woofmark/src/prompts/render.js lines 30 & 31.

nicoleiocana avatar Apr 08 '20 16:04 nicoleiocana

@nicoleiocana Unfortunately, you are wrong again. We never modify dist files and files in the node_modules.

VladimirMikulic avatar Apr 08 '20 16:04 VladimirMikulic

Thanks for helping me understand. So, if can understand correctly, to respect the integrity of Woofmark's original code, any update that we make to that code can only come updates made in new modules that we create?

nicoleiocana avatar Apr 08 '20 16:04 nicoleiocana

@nicoleiocana it's not just specific to Woofmark, but really to any NPM package. The reason we don't modify files in node_modules is that every time we install/update the package again, the changes are erased!

VladimirMikulic avatar Apr 08 '20 18:04 VladimirMikulic

Thank you for your patience and clarification. I'm making an issue right now & want to contribute to PublicLab.Editor. This solidifies a lot of the confusion that I had with working in this repo.

nicoleiocana avatar Apr 08 '20 18:04 nicoleiocana

To be honest, the dist file shouldn't be in the repo at all. It's highly discouraging and anti-pattern, but for some reason, it is present and you'll see it in a lot of PL repos. Don't worry though, you are in right hands since I came here, I enforce best practises as much as I can :)

VladimirMikulic avatar Apr 08 '20 18:04 VladimirMikulic

So glad I can soak up all of the schooling that you are providing me 😂.

Can you offer your insight? Is this why the plots2 cloned repo environment looks like this: plots2-cloned-environment

versus the production environment: plots2-production-environment

nicoleiocana avatar Apr 09 '20 15:04 nicoleiocana

@nicoleiocana yes, it's a bit tricky for newcomers. plots2 doesn't include of all files of the public lab's website. Some of them are bundled in production only and not present in the repo (development) like the homepage for example or this editor styles that you've provided here.

VladimirMikulic avatar Apr 09 '20 15:04 VladimirMikulic

🤔 So, if I were to develop and test here in the PublicLab.Editor repo... how am I certain that the changes will be present in the Publiclab.org site? I can see that the "last four buttons" issue has been attempted by many contributors, too many to link.

nicoleiocana avatar Apr 09 '20 15:04 nicoleiocana

You simply develop in the browser!

VladimirMikulic avatar Apr 09 '20 17:04 VladimirMikulic