codevise/pageflow

View on GitHub

Showing 451 of 1,081 total issues

Function mediaTagHTML has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  mediaTagHTML() {
    const wrapper = document.createElement('div');
    const mediaElement = document.createElement(this.props.tagName);

    mediaElement.setAttribute('preload', 'none');

    Function goTo has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.goTo = function(page, options) {
        options = options || {};
    
        if (page.length && !page.is(currentPage)) {
          var cancelled = false;

      Function renderControlBar has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function renderControlBar(props, darkBackground, fadedOut) {
        return (
          <div onFocus={props.onFocus}
               onBlur={props.onBlur}
               onMouseEnter={props.onMouseEnter}

        Function watchPlayer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function watchPlayer(player, actions) {
          player.on('loadedmetadata', () => actions.metaDataLoaded(player.currentTime(), player.duration()));
          player.on('loadeddata', () => actions.dataLoaded());
        
          player.on('progress', () => actions.progress(player.bufferedEnd()));

          Method video_file_video_tag has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def video_file_video_tag(video_file, options = {})
                defaults = {
                  crossorigin: 'anonymous',
                  class: [
                    'player video-js video-viewport vjs-default-skin',
          Severity: Minor
          Found in app/helpers/pageflow/video_files_helper.rb - About 1 hr to fix

            Method create_files has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def create_files(draft_entry, file_type, file_data_by_name, skip_encoding = false)
                  file_data_by_name.transform_values do |data|
                    say("     creating #{file_type} file from #{data['url']}")
            
                    file_state = %i[image text_track].include?(file_type) ? 'processed' : 'uploading'
            Severity: Minor
            Found in entry_types/scrolled/lib/pageflow_scrolled/seeds.rb - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                if (!isBlankEditableTextValue(caption) || isEditable) {
                  return (
                    <figure className={classNames(styles.root, {[styles.invert]: !darkBackground})}>
                      {children}
              
              
              Severity: Critical
              Found in entry_types/scrolled/package/src/frontend/Figure.js - About 1 hr to fix

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

                  configurationEditor() {
                    this.tab('general', function() {
                      this.input('videoSource', UrlInputView, {
                        supportedHosts: [
                          'http://youtu.be',

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

                      constructor(props, context) {
                        super(props, context);
                  
                        this.displaysTextTracksInNativePlayer =
                          this.props.hasNativeVideoPlayer && tagName == 'video';

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

                      constructor(props, context) {
                        super(props, context);
                    
                        this.state = {
                          handleWidth: null,

                      Function update has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const update = useMemo(() => {
                          let timeout;
                      
                          return {
                            activate(href, openInNewTab, linkRef) {

                        Method scrolled_favicons_for_entry has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def scrolled_favicons_for_entry(entry, entry_mode: :published)
                              render(
                                'pageflow_scrolled/favicons/entry',
                                manifest_path: entry_mode == :published && pageflow.entry_manifest_path(
                                  entry,

                          Method entry_global_links has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def entry_global_links(entry)
                                links = []
                          
                                if entry.site.imprint_link_label.present? && entry.site.imprint_link_url.present?
                                  links << link_to(
                          Severity: Minor
                          Found in app/helpers/pageflow/entries_helper.rb - About 1 hr to fix

                            Function _renderItem has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  _renderItem: function(ul, item) {
                                    var widget = this;
                                    var li = $('<li>', { class: item.value });
                                    var container = $('<div>', { class: 'text-container' }).appendTo(li);
                                    var index = options.values.indexOf(item.value);
                            Severity: Minor
                            Found in package/src/ui/views/inputs/ExtendedSelectInputView.js - About 1 hr to fix

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

                                onRender: function() {
                                  var entry = this.options.entry;
                                  var fileType = this.options.fileType;
                                  var collection = entry.getFileCollection(fileType);
                                  var blankSlateText = I18n.t('pageflow.editor.templates.files_blank_slate.no_files');
                              Severity: Minor
                              Found in package/src/editor/views/FilteredFilesView.js - About 1 hr to fix

                                Function default has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function(pageStateReducers) {
                                  const pageReducers = {};
                                
                                  function getPageReducer(type) {
                                    pageReducers[type] = pageReducers[type] || combineReducers({

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

                                    onRender: function() {
                                      this.pageViews = this.subview(new CollectionView({
                                        el: this.ui.entry,
                                        collection: this.pages,
                                        itemViewConstructor: PagePreviewView,

                                    Function createScrollPositionProvider has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function createScrollPositionProvider(Context, emitter, originalWrapper) {
                                      const OriginalWrapper = originalWrapper ||
                                                              function Noop({children}) { return children; };
                                    
                                      return function ScrollPositionProvider({children}) {

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

                                        configurationEditor({entry}) {
                                          this.tab('general', function() {
                                            this.input('id', FileInputView, {
                                              collection: 'audio_files',
                                              fileSelectionHandler: 'contentElementConfiguration',

                                        Function mouseover [data-tooltip] has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            'mouseover [data-tooltip]': function(event) {
                                              if (!this.tooltip.visible) {
                                                var target = $(event.currentTarget);
                                                var key = target.attr('data-tooltip');
                                                var position;
                                        Severity: Minor
                                        Found in package/src/ui/views/mixins/tooltipContainer.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language