Skip to content
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

Add method to reorder steps in sequencer object #1626

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rishabhshuklax
Copy link
Member

Fixes #1621

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm run test-all
  • 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
  • Insert-step functionality is working correct as expected.

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
Thanks!

@codecov
Copy link

codecov bot commented Feb 12, 2020

Codecov Report

Merging #1626 into main will increase coverage by 10.11%.
The diff coverage is 63.23%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1626       +/-   ##
===========================================
+ Coverage   55.11%   65.23%   +10.11%     
===========================================
  Files         117      132       +15     
  Lines        2344     2750      +406     
  Branches      360      439       +79     
===========================================
+ Hits         1292     1794      +502     
+ Misses       1052      956       -96     
Impacted Files Coverage Δ
examples/lib/scopeQuery.js 18.51% <ø> (ø)
src/Modules.js 100.00% <ø> (ø)
src/modules/WebglDistort/Module.js 2.29% <0.00%> (ø)
src/ui/SetInputStep.js 12.90% <0.00%> (-1.39%) ⬇️
src/modules/ColorHalftone/Module.js 3.63% <3.63%> (ø)
examples/lib/defaultHtmlStepUi.js 11.35% <4.08%> (-0.85%) ⬇️
examples/lib/intermediateHtmlStepUi.js 11.11% <5.55%> (+0.94%) ⬆️
examples/lib/insertPreview.js 13.15% <20.00%> (-0.36%) ⬇️
src/util/getImageDimensions.js 20.00% <20.00%> (ø)
src/util/isGif.js 20.00% <20.00%> (ø)
... and 100 more

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

I think the old code has non-descriptive variables and is, well, old. Can we at least make the new additions better if not change the old code?

@rishabhshuklax
Copy link
Member Author

I think the old code has non-descriptive variables and is, well, old. Can we at least make the new additions better if not change the old code?

I think we should make a seperate issue to change these names in a single PR as changing the names on the newer code will make it inconsistent.

@gitpod-io
Copy link

gitpod-io bot commented Jul 12, 2020

function reorderSteps(source, dest) {
var this_ = (this.name == 'ImageSequencer') ? this : this.sequencer;
var args = [];
var json_q = {};
Copy link
Member

Choose a reason for hiding this comment

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

I meant this btw, can these be named something better?

Copy link
Member Author

Choose a reason for hiding this comment

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

Are that's what I said in the file these names are used in the other functions as well so it'd be better to change it all together so as to avoid any inconsistency.

var args = [];
for (var arg in arguments) args.push(copy(arguments[arg]));
var json_q = formatInput.call(this_, args, '-');
inputlog.push({ method: 'removeSteps', json_q: copy(json_q) });

Copy link
Member

Choose a reason for hiding this comment

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

So you basically don't know what they even mean? 😂

Copy link
Member

Choose a reason for hiding this comment

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

It's fine. APPROVED lol.

Copy link
Member

Choose a reason for hiding this comment

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

Hey lets be nice here! I am probably guilty of the ambiguous naming after all :-) so I can take the blame.

I agree though that let's change it in a consistent manner so as not to confuse folks. And if there are any opportunities to reduce repetitive code, that's great too!

Copy link
Member

Choose a reason for hiding this comment

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

Oh sorry. I was just joking anyway, you are lucky that I didn't build sequencer's backend 😂

Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

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

This is a cool one! I'd like to request:

  1. a good test demonstrating its use and guaranteeing it against future breakage
  2. a line in the README describing the function and how to use it.

Thank you!!!! No rush, just looking for what we should start requiring for all changes moving forward!

@jywarren jywarren added this to the v3.7.0 milestone Oct 28, 2020
@harshkhandeparkar harshkhandeparkar removed this from the v3.7.0 milestone Nov 2, 2020
@harshkhandeparkar harshkhandeparkar added the almost-complete PRs that are almost done but little more work. label Jul 27, 2021
@jywarren jywarren added this to In progress in v3.7.x via automation Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
almost-complete PRs that are almost done but little more work.
Projects
v3.7.x
In progress
Development

Successfully merging this pull request may close these issues.

Method to reorder steps
3 participants