codevise/pageflow

View on GitHub

Showing 451 of 1,081 total issues

Function measureHeights has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function measureHeights(editor, container) {
  const containerRect = container.getBoundingClientRect();
  let lastTargetDimensions = {top: 0, height: 0};
  let lastRectBottom = 0;

    Function Center has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function Center(props) {
    
      return (
        <div className={classNames(styles.root)}>
          <div ref={props.contentAreaRef} />
    Severity: Minor
    Found in entry_types/scrolled/package/src/frontend/layouts/Center.js - About 1 hr to fix

      Function updateAreaSelect has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        updateAreaSelect() {
          var imageWidth = this.options.file.get('width');
          var imageHeight = this.options.file.get('height');
      
          this.ui.image.imgAreaSelect({

        Function getMetaData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          getMetaData: function () {
            var self = this;
            this.model.get('importer').getFilesMetaData().then(function (metaData) {
              if (metaData) {
                self.model.set('metaData', metaData);
        Severity: Minor
        Found in package/src/editor/views/FilesImporterView.js - About 1 hr to fix

          Function constructor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor: function(options) {
              var parent = options.parent;
              var parentModel = options.parentModel;
          
              this.autoConsolidatePositions = options.autoConsolidatePositions;
          Severity: Minor
          Found in package/src/editor/collections/ForeignKeySubsetCollection.js - About 1 hr to fix

            Function startEventPropagation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function startEventPropagation(player, id) {
                let playCallback = function() {
                  that.trigger('play', {audioFileId: id});
                }
                let pauseCallback = function() {
            Severity: Minor
            Found in package/src/frontend/media/MultiPlayer.js - About 1 hr to fix

              Method default_thumbnail_candidates has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def self.default_thumbnail_candidates
                    [
                      {
                        file_collection: 'image_files',
                        attribute: 'thumbnail_image_id'
              Severity: Minor
              Found in lib/pageflow/built_in_page_type.rb - About 1 hr to fix

                Method thumbnail_candidates has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def thumbnail_candidates
                      [
                        {
                          file_collection: 'image_files',
                          attribute: 'thumbnail_image_id'
                Severity: Minor
                Found in lib/pageflow/page_type.rb - About 1 hr to fix

                  Function render has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const page = this.props.page;
                  
                      return (
                        <PageWrapper className={classNames({unplayed: !this.props.textHasBeenHidden}, 'hide_content_with_text')}>

                    Function configurationEditor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      configurationEditor({entry, contentElement}) {
                        this.tab('general', function() {
                          this.input('image', FileInputView, {
                            collection: 'image_files',
                            fileSelectionHandler: 'contentElementConfiguration',

                      Function setup has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Slideshow.setup = function(options) {
                        function configurationsById(pages) {
                          return _.reduce(pages, function(memo, page) {
                            memo[page.id] = page.configuration;
                            return memo;

                        Function Waveform has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Waveform(props) {
                          if (props.pageIsPrepared && props.mediaElementId) {
                            return (
                              <Measure whitelist={['height']}>
                                { ({height}) =>

                          Function onRender has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            onRender() {
                              if (this.options.portraitFile) {
                                const tabsView = new TabsView({
                                  translationKeyPrefixes: [`${i18nPrefix}.tabs`],
                                  defaultTab: this.options.defaultTab

                            Function useChapters has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function useChapters() {
                              const chapters = useEntryStateCollectionItems('chapters');
                            
                              return useMemo(() => {
                                const chapterSlugs = {};
                            Severity: Minor
                            Found in entry_types/scrolled/package/src/entryState/structure.js - About 1 hr to fix

                              Function useShortcutHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function useShortcutHandler(editor) {
                                return useCallback(event => {
                                  if (!event.ctrlKey) {
                                    return;
                                  }

                                Function hooks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const hooks = function(player, hooks) {
                                  var originalPlay = player.play;
                                
                                  player.updateHooks = (newHooks) => {
                                    hooks = newHooks;
                                Severity: Minor
                                Found in package/src/frontend/mediaPlayer/hooks.js - About 1 hr to fix

                                  Function onRender has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    onRender: function() {
                                      var view = this;
                                      var file = this.model.getReference(this.options.propertyName, this.options.filesCollection),
                                          image = $('<img />').attr('src', file.getBackgroundPositioningImageUrl());
                                  
                                  
                                  Severity: Minor
                                  Found in package/src/editor/views/BackgroundPositioningSlidersView.js - About 1 hr to fix

                                    Function initialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      initialize: function(options) {
                                        this.model = options.model;
                                        this.typeName = options.typeName;
                                        this.collectionName = options.collectionName;
                                        this.topLevelType = options.topLevelType;
                                    Severity: Minor
                                    Found in package/src/editor/api/FileType.js - About 1 hr to fix

                                      Function onRender has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        onRender: function() {
                                          var view = this;
                                      
                                          _(this.options.columns).each(function(column) {
                                            this.ui.headRow.append(this.subview(new TableHeaderCellView({
                                      Severity: Minor
                                      Found in package/src/ui/views/TableView.js - About 1 hr to fix

                                        Function show has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          show: function(text, position, options) {
                                            options = options || {};
                                            this.visible = true;
                                        
                                            clearTimeout(this.timeout);
                                        Severity: Minor
                                        Found in package/src/ui/views/TooltipView.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language