-
Notifications
You must be signed in to change notification settings - Fork 209
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
Added Color Picker for selecting RGBA values in modules #1095
Conversation
Omg!!!! I was just thinking of this today!!!! This is awesome. Can we get
another review of it?
…On Sun, Jun 2, 2019, 3:38 PM aashna27 ***@***.***> wrote:
Fixes #597 <#597>
- tests pass -- look for a green checkbox ✔️ a few minutes after
opening your PR -- or run tests locally with npm test
- code is in uniquely-named feature branch and has no merge conflicts
- PR is descriptively titled
- ask @publiclab/is-reviewers for help, in a comment below
[image: Screenshot from 2019-06-03 01-06-30]
<https://user-images.githubusercontent.com/26546120/58766418-ec284d00-859b-11e9-95e1-fa2dce53458d.png>
Thanks!
------------------------------
You can view, comment on, or merge this pull request online at:
#1095
Commit Summary
- Added Color Picker for selecting RGBA values in modules
File Changes
- *M* examples/index.html
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-0>
(2)
- *M* examples/lib/defaultHtmlStepUi.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-1>
(4)
- *M* package-lock.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-2>
(4087)
- *M* package.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-3>
(1)
- *M* src/modules/Crop/Crop.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-4>
(3)
- *M* src/modules/Crop/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-5>
(6)
- *M* src/modules/DrawRectangle/DrawRectangle.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-6>
(3)
- *M* src/modules/DrawRectangle/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-7>
(5)
- *M* src/modules/GridOverlay/GridOverlay.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-8>
(3)
- *M* src/modules/GridOverlay/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-9>
(4)
- *M* src/modules/PaintBucket/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-10>
(4)
- *M* src/modules/ReplaceColor/ReplaceColor.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-11>
(12)
- *M* src/modules/ReplaceColor/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-12>
(8)
- *M* src/modules/TextOverlay/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-13>
(14)
- *M* src/modules/Tint/Module.js
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-14>
(4)
- *M* src/modules/Tint/info.json
<https://github.com/publiclab/image-sequencer/pull/1095/files#diff-15>
(5)
Patch Links:
- https://github.com/publiclab/image-sequencer/pull/1095.patch
- https://github.com/publiclab/image-sequencer/pull/1095.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1095?email_source=notifications&email_token=AAAF6J45I5FZBRM4DA2GFADPYQOPNA5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXFFPIQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J3XGWBF5SH2SUWKZ7DPYQOPNANCNFSM4HSDLCRQ>
.
|
yeahhh !!! just waiting for the the tests to finish ... really happyy!!!!!! 🎉 🎉 |
have also started with input x,y clicks but stuck on how to do it with event-listener.. 😞 |
Yeah this is awesome.
What about using an input add-on showing a paint palette or something?
https://getbootstrap.com/docs/3.3/components/
https://fontawesome.com/icons?q=palette
…On Sun, Jun 2, 2019, 3:50 PM aashna27 ***@***.***> wrote:
Omg!!!! I was just thinking of this today!!!! This is awesome. Can we get
another review of it?
… <#m_-8855283583796921011_>
On Sun, Jun 2, 2019, 3:38 PM aashna27 *@*.***> wrote: Fixes #597
<#597> <#597
<#597>> - tests pass
-- look for a green checkbox heavy_check_mark a few minutes after opening
your PR -- or run tests locally with npm test - code is in uniquely-named
feature branch and has no merge conflicts - PR is descriptively titled -
ask @publiclab/is-reviewers
<https://github.com/orgs/publiclab/teams/is-reviewers> for help, in a
comment below [image: Screenshot from 2019-06-03 01-06-30]
https://user-images.githubusercontent.com/26546120/58766418-ec284d00-859b-11e9-95e1-fa2dce53458d.png
Thanks! ------------------------------ You can view, comment on, or merge
this pull request online at: #1095
<#1095> Commit Summary -
Added Color Picker for selecting RGBA values in modules File Changes - *M*
examples/index.html
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-0 (2) -
*M* examples/lib/defaultHtmlStepUi.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-1 (4) -
*M* package-lock.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-2
(4087) - *M* package.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-3 (1) -
*M* src/modules/Crop/Crop.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-4 (3) -
*M* src/modules/Crop/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-5 (6) -
*M* src/modules/DrawRectangle/DrawRectangle.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-6 (3) -
*M* src/modules/DrawRectangle/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-7 (5) -
*M* src/modules/GridOverlay/GridOverlay.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-8 (3) -
*M* src/modules/GridOverlay/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-9 (4) -
*M* src/modules/PaintBucket/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-10 (4)
- *M* src/modules/ReplaceColor/ReplaceColor.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-11 (12)
- *M* src/modules/ReplaceColor/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-12 (8)
- *M* src/modules/TextOverlay/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-13 (14)
- *M* src/modules/Tint/Module.js
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-14 (4)
- *M* src/modules/Tint/info.json
https://github.com/publiclab/image-sequencer/pull/1095/files#diff-15 (5)
Patch Links: -
https://github.com/publiclab/image-sequencer/pull/1095.patch -
https://github.com/publiclab/image-sequencer/pull/1095.diff — You are
receiving this because you are subscribed to this thread. Reply to this
email directly, view it on GitHub <#1095
<#1095>?email_source=notifications&email_token=AAAF6J45I5FZBRM4DA2GFADPYQOPNA5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXFFPIQ>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6J3XGWBF5SH2SUWKZ7DPYQOPNANCNFSM4HSDLCRQ
.
yeahhh !!! just waiting for the the tests to finish ... really
happyy!!!!!! 🎉 🎉
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#1095?email_source=notifications&email_token=AAAF6JY6CUN75APNZENWIGLPYQP6NA5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX4WNA#issuecomment-498060084>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6JYRFORUGZ6EBXL3FATPYQP6NANCNFSM4HSDLCRQ>
.
|
Yeahh!!!great I ll add a span next to it, idk why the tests are taking so longg....... |
Have indented the defaultHtmlStepUi.js file to clearly identify the else if conditions and also added a span to identify a color-picker input field. @jywarren I went with this as it is also dynamic and changes color instead of the static fontawesome icon. Please have a look. @publiclab/reviewers @publiclab/image-sequencer-guides @publiclab/soc It is perfectly responsive for all sizes and changes. |
examples/lib/defaultHtmlStepUi.js
Outdated
|
||
if(inputDesc.id == 'color-picker'){ // separate input field for color-picker |
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.
It would be great. If you can add spaces before (
, {
, +
, +=
etc. It improves readability. :)
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.
Yup agreed totally!! adding it
examples/lib/defaultHtmlStepUi.js
Outdated
|
||
if (inputDesc.type.toLowerCase() == 'range') { | ||
html += | ||
'"min="' + |
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.
You have added extra tab by mistake. Small fix.
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.
You have added extra tab by mistake. Small fix.
yeahh I ll modify that, and also I have added indentation as another conditional level I have added.
examples/index.html
Outdated
@@ -27,6 +27,7 @@ | |||
<script src="../src/ui/prepareDynamic.js"></script> | |||
<script src="../dist/image-sequencer.js" charset="utf-8"></script> | |||
<script src="../dist/image-sequencer-ui.js" charset="utf-8"></script> | |||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.3/js/bootstrap-colorpicker.js"></script> |
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.
When it is ready. Please change src pointing to package in node modules. As I can see you have already included the package.
Good choice of library. 😍
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.
Actually both these things are needed for incorporating the plugin.
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.
Can it not be included through node modules? Isn't the library available in node? @aashna27?
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.
Yeah I have made those changes! Thanks a lot 👍 @jainaman224 @harshkhandeparkar
@jywarren I would suggest to use As far as I know,
|
@jainaman224 thanks for reviewing!! |
What is this in reference to? I did not understand. |
Codecov Report
@@ Coverage Diff @@
## main #1095 +/- ##
==========================================
- Coverage 56.15% 56.07% -0.08%
==========================================
Files 112 112
Lines 2292 2297 +5
Branches 359 360 +1
==========================================
+ Hits 1287 1288 +1
- Misses 1005 1009 +4
|
Sorry I missed this notification. I was stating it regarding DOM manipulation. Have a look at https://stackoverflow.com/questions/2946656/advantages-of-createelement-over-innerhtml. |
Cool, is this ready then for merge? Feel free to re-request review when it
is. And I enabled the 2-review policy to try that out so if someone else
can approve too that'd be great!
…On Sat, Jun 8, 2019, 2:26 PM Aman Jain ***@***.***> wrote:
Sorry I missed this notification. I was stating it regarding DOM
manipulation.
Have a look at
https://stackoverflow.com/questions/2946656/advantages-of-createelement-over-innerhtml
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1095?email_source=notifications&email_token=AAAF6J5MQXWHJH73BJNOLV3PZQPXRA5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXH6WBI#issuecomment-500165381>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J6NDJ42TECQ3F7GNA3PZQPXRANCNFSM4HSDLCRQ>
.
|
Ohh okayy, yeah thanks so you are suggesting better ways for making dom,
yeah i understand and if i get spare time from my next week's task I will
do some refactoring for it. Thanks!
…On Sun, Jun 9, 2019, 2:56 AM Aman Jain ***@***.***> wrote:
Sorry I missed this notification. I was stating it regarding DOM
manipulation.
Have a look at
https://stackoverflow.com/questions/2946656/advantages-of-createelement-over-innerhtml
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1095?email_source=notifications&email_token=AGKQ7SHIPUEONFSTFVQTVILPZQPXXA5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXH6WBI#issuecomment-500165381>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGKQ7SF5NZRCICWNQ4EIQNDPZQPXXANCNFSM4HSDLCRQ>
.
|
I have removed the alpha value from 2 modules as the decimal values are changing to 0 or 1. So we are getting only 2 colors black or white. |
@harshithpabbati @harshkhandeparkar @jainaman224 @rbhatia46 @IgorWilbert if you could review, I ll resolve conflicts after that! |
I will review in a few hours |
@aashna27 I didn't get time to use my PC today. Will it be okay if I review it tomorrow? |
Yeah that's okay, anyway the travis isn't showing any progress. Cool it works now!!!!
…On Thu, Jun 13, 2019, 10:52 PM Harsh Khandeparkar ***@***.***> wrote:
@aashna27 <https://github.com/aashna27> I didn't get time to use my PC
today. Will it be okay if I review it tomorrow?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1095?email_source=notifications&email_token=AGKQ7SGDLWPGWSP3KQSB7TLP2J657A5CNFSM4HSDLCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXUNUUI#issuecomment-501799505>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGKQ7SCV4NZQKUM3ADRJV2TP2J657ANCNFSM4HSDLCRQ>
.
|
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 guess you cannot check for color-picker
type directly as examples/lib/mapHtmlTypes.js
maps any non-recognised type to just text. @aashna27
default:
htmlType = 'text';
break;
You will have to edit ⬆️ this too.
No we aren't checking for color-picker type, but assigning an id=color-picker the type can be text or string. |
@harshkhandeparkar I hope the changes you requested have been answered. Would you like to approve this now? Lemme know if there are any other modifications needed. Thanks 😸 |
Awesome!!! Let's resolve conflicts and merge!!!! |
Resolved and thanks! 😄 |
Fixes #597
npm test
@publiclab/is-reviewers
for help, in a comment belowThanks!