Skip to content

Add method to reorder steps in sequencer object#1626

Open
rishabhshuklax wants to merge 2 commits intopubliclab:mainfrom
rishabhshuklax:reorderSteps
Open

Add method to reorder steps in sequencer object#1626
rishabhshuklax wants to merge 2 commits intopubliclab:mainfrom
rishabhshuklax:reorderSteps

Conversation

@rishabhshuklax
Copy link
Copy Markdown
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
Copy Markdown

codecov Bot commented Feb 12, 2020

Codecov Report

❌ Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.23%. Comparing base (853e719) to head (fa96a7a).
⚠️ Report is 387 commits behind head on main.

Files with missing lines Patch % Lines
src/ImageSequencer.js 11.11% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1626      +/-   ##
==========================================
- Coverage   66.67%   65.23%   -1.45%     
==========================================
  Files         130      132       +2     
  Lines        2686     2750      +64     
  Branches      433      439       +6     
==========================================
+ Hits         1791     1794       +3     
- Misses        895      956      +61     
Files with missing lines Coverage Δ
src/ImageSequencer.js 48.25% <11.11%> (-2.06%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

gitpod-io Bot commented Jul 12, 2020

Comment thread src/ImageSequencer.js
function reorderSteps(source, dest) {
var this_ = (this.name == 'ImageSequencer') ? this : this.sequencer;
var args = [];
var json_q = {};
Copy link
Copy Markdown
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
Copy Markdown
Member Author

@rishabhshuklax rishabhshuklax Jul 12, 2020

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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

None yet

Development

Successfully merging this pull request may close these issues.

Method to reorder steps

3 participants