codevise/pageflow

View on GitHub

Showing 1,055 of 1,055 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export function Tooltip({
  bubbleClassName,
  arrowPos,
  children,
  content,
Severity: Minor
Found in entry_types/scrolled/package/src/frontend/Tooltip.js and 2 other locations - About 40 mins to fix
entry_types/scrolled/package/src/contentElements/hotspots/Tooltip.js on lines 17..115
entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js on lines 81..106

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export function Tooltip({
  area,
  contentElementId, portraitMode, configuration, visible, active,
  onMouseEnter, onMouseLeave, onClick
}) {
entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js on lines 81..106
entry_types/scrolled/package/src/frontend/Tooltip.js on lines 6..30

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    expect(dispatch).toHaveBeenCalledWith(sinon.match({
      type: RESET,
      payload: {
        items: [{longTitle: 'News'}]
      }
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 60..65
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 81..86
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 42..47
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 62..67
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 84..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    expect(dispatch).toHaveBeenCalledWith(sinon.match({
      type: RESET,
      payload: {
        items: [{type: 'gallery'}]
      }
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 40..45
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 60..65
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 81..86
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 42..47
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 84..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    expect(dispatch).toHaveBeenCalledWith(sinon.match({
      type: RESET,
      payload: {
        items: [{longTitle: 'News'}]
      }
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 40..45
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 60..65
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/loadFromSeed-spec.js on lines 81..86
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 62..67
entry_types/paged/packages/pageflow-paged-react/src/collections/__spec__/watchBackboneCollection-spec.js on lines 84..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  getChapterConfiguration: function(id) {
    var chapter = this.chapters.get(id);
    return chapter ? chapter.configuration.attributes : {};
  },
entry_types/paged/packages/pageflow-paged/src/editor/models/PreviewEntryData.js on lines 20..23
entry_types/paged/packages/pageflow-paged/src/editor/models/PreviewEntryData.js on lines 50..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  getPageConfiguration: function(permaId) {
    var page = this.pages.getByPermaId(permaId);
    return page ? page.configuration.attributes : {};
  },
entry_types/paged/packages/pageflow-paged/src/editor/models/PreviewEntryData.js on lines 20..23
entry_types/paged/packages/pageflow-paged/src/editor/models/PreviewEntryData.js on lines 25..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if (this.options.defaultValueBinding) {
      this.listenTo(this.model, 'change:' + this.options.defaultValueBinding, this.updateSettings);
    }
Severity: Minor
Found in package/src/ui/views/inputs/ColorInputView.js and 1 other location - About 40 mins to fix
package/src/ui/views/mixins/inputWithPlaceholderText.js on lines 26..30

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.ui.inputVertical.on('change', function() {
      view.save('y', $(this).val());
    });
Severity: Minor
Found in package/src/editor/views/BackgroundPositioningSlidersView.js and 1 other location - About 40 mins to fix
package/src/editor/views/BackgroundPositioningSlidersView.js on lines 84..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  player.on('timeupdate', () => actions.timeUpdate({
    currentTime: player.currentTime(),
    duration: player.duration()
  }));
entry_types/paged/packages/pageflow-paged-react/src/media/components/createFilePlayer/watchPlayer.js on lines 2..5

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.ui.inputHorizontal.on('change', function() {
      view.save('x', $(this).val());
    });
Severity: Minor
Found in package/src/editor/views/BackgroundPositioningSlidersView.js and 1 other location - About 40 mins to fix
package/src/editor/views/BackgroundPositioningSlidersView.js on lines 80..82

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  player.on('loadedmetadata', () => actions.metaDataLoaded({
    currentTime: player.currentTime(),
    duration: player.duration()
  }));
entry_types/paged/packages/pageflow-paged-react/src/media/components/createFilePlayer/watchPlayer.js on lines 21..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if (this.options.placeholderBinding) {
      this.listenTo(this.model,
                    'change:' + this.options.placeholderBinding,
                    this.updatePlaceholder);
    }
Severity: Minor
Found in package/src/ui/views/mixins/inputWithPlaceholderText.js and 1 other location - About 40 mins to fix
package/src/ui/views/inputs/ColorInputView.js on lines 67..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function initPlayer has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function initPlayer(player, getPlayerState, playerActions, prevFileId, fileId) {

    Function useScrollPosition has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function useScrollPosition(effect, deps, element, useWindow, wait) {
    Severity: Minor
    Found in entry_types/scrolled/package/src/frontend/useScrollPosition.js - About 35 mins to fix

      Function deleteCharacter has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      export function deleteCharacter(editor, node, path, regExp, offset = 0) {

        Function renderChapters has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function renderChapters(entryStructure,
                                currentSectionIndex,
                                setCurrentSection,
                                scrollTargetSectionIndex,
                                setScrollTargetSectionIndex) {
        Severity: Minor
        Found in entry_types/scrolled/package/src/frontend/Content.js - About 35 mins to fix

          Function className has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function className(isSectionSelected, transitionSelection, isHighlighted, isBackdropElementSelected, transitions) {

            Function getMotifAreaPadding has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              contentRequiresPadding, transitions, motifAreaDimension, backdropContentElement, empty
            Severity: Minor
            Found in entry_types/scrolled/package/src/frontend/v1/useMotifAreaState.js - About 35 mins to fix

              Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def initialize(entry, template, configuration, property_base_name, options)
              Severity: Minor
              Found in app/helpers/pageflow/background_image_helper.rb - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language