Todos for discourse/discourse

These are TODOs that are seen in the code

group-post-stream.js.es6
          
            export default Ember.Component.extend({
  actions: {
    // TODO: When on Ember 1.13, use a closure
          
      
search-full-test.js.es6
          
            import { acceptance } from "helpers/qunit-helpers";
acceptance("Search - Full Page");

// TODO
          
      
Gemfile
          
            

# TODO: We need our own gem server 
gem 'discourse_plugin', path: '../discourse_plugin'

# Specify
          
      
topic_poster.rb
          
            ,
      'extras' => extras,
      'id' => id
    }
  end

  # TODO: Remove when old list is removed
  def [](attr)
    send(attr)
  end
end

          
      
plugin.rb
          
            /3/image.json")

      # TODO: Mix the following logic in Upload#store_file
      # return Imgur
          
      
badge_grant.rb
          
            
          # TODO - expose errors in UI
          Discourse.handle_job_exception(ex, error_context
          
      
user-info.js.es6
          
            ',
  userPath: url('user.username', '/users/%@'),

  // TODO: In later ember releases `hasBlock` works
          
      
draft.js.es6
          
            (key, current) {
    // TODO: implement this
    return current;
  },

  save(key, sequence, data
          
      
topic_status_update_spec.rb
          
            # encoding: UTF-8

require 'rails_helper'
require_dependency 'post_destroyer'

# TODO - test
          
          
            (:admin) { Fabricate(:admin) }

  it "avoids notifying on automatically closed topics" do
    # TODO
          
      
admin-logs-staff-action-logs.js.es6
          
            ({
  // TODO: make this automatic using an `{{outlet}}`
  renderTemplate: function() {
    this.render('admin
          
      
email.rb
          
            

  def self.cleanup_alias(name)
    # TODO: I'm sure there are more, but I can't find a list
    name ? name.gsub(/[:<>,]/, '') : name
  end

end

          
      
mobile.scss
          
            @import "common";

/* @import "mobile/*"; TODO: get this working again */

@import "mobile/buttons
          
      
draft_controller.rb
          
            class DraftController < ApplicationController
  before_filter :ensure_logged_in
  # TODO really do
          
      
desktop.scss
          
            @import "common";

/* @import "desktop/*"; TODO: get this working again */

@import "desktop/alert
          
      
basic_group_serializer.rb
          
            
    # TODO: fix this N+1
    GroupUser.where(group_id: object.id, user_id: scope.user.id).first.try
          
      
category-hashtag-test.js.es6
          
             a category hashtag #bug");
  andThen(() => {
    // TODO: Test that the autocomplete shows
    equal
          
      
exception.js.es6
          
            .status', 500),
  isUnknown: Em.computed.none('isNetwork', 'isServer'),

  // TODO
  // make ajax
          
          
            .forbidden');
    } else {
      // TODO
      return I18n.t('errors.reasons.unknown
          
      
list-item-view-mixin.js.es6
          
            ;
    }

    // // TODO: avoid needing this by avoiding unnecessary
    // // calls to this method in the first
          
      
base.scss
          
            

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

pre code {
  overflow: auto;
}

// TODO figure
          
      
twitter_authenticator.rb
          
            class Auth::TwitterAuthenticator < Auth::Authenticator

  def name
    "twitter"
  end

  # TODO
          
      
user_actions_controller.rb
          
             private_messages
    # DO NOT REMOVE
    # TODO should preload messages to avoid extra http req
  end

end

          
      
process_post.rb
          
            )

        if orig_cooked.present? && cooked.blank?
          # TODO suicide if needed, let's gather a few
          
      
admin_badge_preview.hbs
          
            .preview.sql_error_header'}}</p>

    <pre class="badge-errors">{{errors}}</pre>

    <!--
    TODO
          
      
complete.html.erb_spec.rb
          
            (:auth_result, result)

    render

    expect(rendered_data["email"]).to eq(result.email)
    # TODO
          
      
tag-hashtag-test.js.es6
          
             hashtag #monkey::tag");
  andThen(() => {
    // TODO: Test that the autocomplete shows
    equal(find
          
      
topic_exporter.rb
          
            
      export_topics
      # TODO: user actions

      self
    end


    USER_ATTRS = [:id, :email
          
          
            
      # TODO: avatar

      @exported_user_ids = []
      @topic_ids.each do |topic_id|
        t = Topic.find
          
      
helpers.rb
          
             user.present?

      # TODO: Add support for ES6 and call `avatar-template` directly
      if !user
          
          
             === topic_id
      # TODO this only handles public topics, secured one do not get this
      topic = Topic
          
      
user_blocker_spec.rb
          
            

      # TODO: it 'logs the action'
    end

    context 'not given a staff user argument' do
      it 'sends
          
          
            )
      SystemMessage.expects(:create).never
      unblock_user
    end

    # TODO: it 'logs the action'
  end
          
      
topic-status.js.es6
          
            ");
    var results =  [];
    var self = this;

    // TODO, custom statuses? via override?

    if(topic
          
      
list-view-helper.js.es6
          
            import Ember from 'ember';

// TODO - remove this!
var el    = document.body || document
          
      
instagram_authenticator.rb
          
            

  # TODO twitter provides all sorts of extra info, like website/bio etc.
  #  it may be worth considering
          
      
reload_css.rb
          
            )/ }
      # todo connect to dev instead?
      ActiveRecord::Base.establish_connection
      [:desktop
          
      
topic-closing.js.es6
          
            : moment.duration(autoCloseHours, "hours").humanize() }) );
    buffer.push('</h3>');

    // TODO Sam
          
      
load-script.js.es6
          
            ) {

  // TODO: Remove this once plugins have been updated not to use it:
  if (url === "defer
          
      
offset-calculator.js.es6
          
            // TODO: This is quite ugly but seems reasonably fast? Maybe refactor
// this out before we merge
          
      
flag_query.rb
          
            .post_id]
      post.post_actions ||= []
      # TODO: add serializer so we can skip this
      action
          
          
            

    # maintain order
    posts = post_ids.map { |id| post_lookup[id] }
    # TODO: add serializer
          
      
loader.js
          
            ;
    var reified = new Array(length);
    var dep;
    // TODO: new Module
    // TODO: seen refactor
          
      
user_importer.rb
          
            ::INACTIVE_MANUAL
          row[:ban_reason] = 'Anonymous user from phpBB3' # TODO i18n
          suspend_user
          
          
            ? ? 'Account deactivated by administrator' : row[:ban_reason] # TODO i18n
      elsif row[:ban_start
          
      
user-search.js.es6
          
            ;

  return new Ember.RSVP.Promise(function(resolve) {
    // TODO site setting for allowed regex in
          
      
live-development.js.es6
          
            ();
                });
              }
            });
          });

        } else {
          $('link').each(function() {
            // TODO: stop bundling css in DEV
          
      
poster-name.js.es6
          
            .trigger-user-card',

  // TODO: Allow extensibility
  posterGlyph(attrs) {
    if (attrs.moderator
          
      
discovery-categories.js.es6
          
            ", "categories");
  },

  model() {
    // TODO: Remove this and ensure server side does not supply
          
      
topic-from-params.js.es6
          
             () {
      // TODO we are seeing errors where closest post is null and this is exploding
      // we need
          
      
incoming_links_report_spec.rb
          
            ('top_traffic_sources').as_json }

    # TODO: STOP THE STUBBING
    def stub_empty_traffic_source_data
          
          
            (:top_referred_topics) { IncomingLinksReport.find('top_referred_topics').as_json }

    # TODO: STOP THE
          
      
discourse.js.es6
          
            (); }

  // TODO: Avoid container lookup here
  const appEvents = Discourse.__container__.lookup
          
      
100-logster.rb
          
            .connection_handler.clear_active_connections!
  end
}

# TODO logster should be able to do this automatically
          
      
tags-show.js.es6
          
            () {
      const self = this;
      // TODO: this probably doesn't work anymore
      return this.store
          
      
category-chooser.js.es6
          
            ('description');
    // TODO wtf how can this be null?;
    if (description && description !== 'null
          
      
category-link.js.es6
          
             categoryOptions = {};

  // TODO: This is a compatibility layer with the old helper structure.
  // Can be
          
      
text_sentinel.rb
          
            # Whe use ActiveSupport mb_chars from here to properly support non ascii downcase
# TODO remove
          
      
edit-topic-auto-close.js.es6
          
            .auto_close.error'));
      }
    }).catch(() => {
      // TODO - incorrectly responds to network errors
          
      
search.js.es6
          
            .grouped_search_result;
  results.resultTypes = [];

  // TODO: consider refactoring front end to take a better
          
      
subscribe-user-notifications.js.es6
          
             cached notifications, we used to store in local storage
    // TODO 2017 delete this line
          
      
topic_view_serializer.rb
          
            ,
             :tags

  # TODO: Split off into proper object / serializer
  def details
    result
          
          
            , sym)}
      # TODO: other keys? :can_defer_flags, :acted, :can_undo
    end
    result
  end

  def
          
      
discourse_tagging.rb
          
            : name)
        end
      end
    end
  end

  # TODO: this is unused?
  def self.notification_key
          
          
            (tag_id)
    "tags_notification:#{tag_id}"
  end

  # TODO: this is unused?
  def self.muted_tags(user
          
      
base.rb
          
            
    end
  end

  def stop
    @started = false
    if @pid
      # TODO configurable stop signal
          
      
topic_tracking_state_spec.rb
          
            

  let(:post) do
    create_post
  end

  it "can correctly publish unread" do
    # TODO setup
          
      
discourse_defaults.conf
          
             version of discourse is released
# this is global so it is easier to set in multisites
# TODO allow
          
      
assets.rake
          
            

    module ::Sprockets
      # TODO: https://github.com/rails/sprockets-rails/pull/342
      # Rails
          
      
discourse.js.es6
          
            ) {
    // TODO, how to dispatch this to the controller without the container?
    const loginController
          
      
full-page-search.js.es6
          
            () {
      // TODO: dupe code should be centralized
      ajax("/static/search_help.html", { dataType: 'html
          
      
site.js.es6
          
             (existingCategory) {
      existingCategory.setProperties(newCategory);
    } else {
      // TODO insert in right
          
      
test_helper.js
          
            ();

  server.shutdown();
});

// Load ES6 tests
var helpers = require("helpers/qunit-helpers");

// TODO
          
      
store.js.es6
          
            ;
    obj.__type = type;
    obj.__state = obj.id ? "created" : "new";

    // TODO: Have injections be
          
          
             already have categories in memory
    // TODO: topics do their own resolving of `category_id`
    // to
          
      
pretty_text.rb
          
             the client
    # TODO: use the same extensions on both client and server (in particular the template
          
          
            
  end

  def self.excerpt(html, max_length, options={})
    # TODO: properly fix this HACK in
          
      
tags_controller.rb
          
            ,
          extras: { categories: category_tag_counts }
        }
      end
    end
  end

  # TODO: move all this
          
          
             !@filter_on_category

      guardian.ensure_can_see!(@filter_on_category)
    end

    # TODO: this is
          
      
post_alerter.rb
          
            .username_lower
      }.to_json
    )

    # TODO decide if it makes sense to also publish a desktop notification
          
          
            

  end

  # TODO: Move to post-analyzer?
  def extract_mentions(post)
    mentions = post.raw_mentions
          
      
keyboard-shortcuts.js.es6
          
            (action) {
    const container = this.container;
    // TODO: We should keep track of the post without
          
          
            );
      if (post) {
        // TODO: Use ember closure actions
        let actionMethod
          
      
instance.rb
          
            )
    end

    # TODO: possibly amend this to a rails engine

    # Automatically include assets
          
          
            (/\s/,"_")
      # TODO a cleaner way of registering and unregistering
      `rm -f #{target}`
      `ln -s
          
      
discourse.rb
          
            
    # TODO: should cache these when we get a notification system for site settings
    set = Set.new
          
          
            
      digest
    end
  end

  def self.authenticators
    # TODO: perhaps we don't need auth providers
          
      
user.js.es6
          
            [s + '_category_ids'] = cat_ids;
      }
    });

    // TODO: We can remove this when migrated fully to
          
          
             = User.create({username: username});
    return user.findDetails(options);
  },

  // TODO: Use app
          
      
lazyYT.js
          
             defaultSettings = {
      default_ratio: '16:9',
      callback: null, // ToDO execute callback if
          
      
vanilla.rb
          
            ..."
      file = read_file

      # TODO: parse header & validate version number
      header = file
          
      
static_controller.rb
          
            '] = ''
    # TODO send_file chunks which kills caching, need to render text here
    send_file(path, opts)
  end

end

          
      
topic_tracking_state.rb
          
            .publish_unread(post)
    # TODO at high scale we are going to have to defer this,
    #   perhaps
          
      
bench.rb
          
            
  end


  # TODO include Facter.to_hash ... for all facts
ensure
  Process.kill "KILL", pid
end

          
      
smoke_test.js
          
            ");
  });

  // TODO: Looks like PhantomJS 2.0.0 has a bug with `uploadFile`
  // which breaks this
          
      
rails_helper.rb
          
            
    end

    config.before :each do |x|
      # TODO not sure about this, we could use a mock redis
          
      
formatter.js.es6
          
            /convert-string-to-title-case-with-javascript
// TODO: locale support ?
export function toTitleCase(str) {
  return str
          
      
invites_controller.rb
          
            require_dependency 'rate_limiter'

class InvitesController < ApplicationController

  # TODO
          
      
composer-messages.js.es6
          
            ; }
    if (title.length < Discourse.SiteSettings.min_title_similar_length) { return; }

    // TODO pass the
          
      
widget.js.es6
          
            ;
      }

      if (target) {
        // TODO: Use ember closure actions
        const actions = target._actions
          
      
pull_translations.rb
          
            )
        # fix_invalid_yml(filename)

        # TODO check if this is still needed with recent
          
      
client.gl.yml
          
            : "todo"
      no_subcategory: "ningunha"
      category: "Categoría"
      category_list: "Amosar a lista
          
          
            :
        all: "Todo"
        inbox: "Caixa de entrada"
        sent: "Enviados"
        archive
          
      
route-recognizer.js
          
            .length;
    var reified = new Array(length);
    var dep;
    // TODO: new Module
    // TODO: seen
          
      
topic_view.rb
          
            .first
    @desired_post
  end

  def summary
    return nil if desired_post.blank?
    # TODO, this
          
          
            
  end

  def filter_posts_by_ids(post_ids)
    # TODO: Sort might be off
    @posts = Post.where(id
          
      
server.gl.yml
          
            :"
  read_full_topic: "Ler todo o tema"
  private_message_abbrev: "Msx."
  rss_description:
    latest: "Últimos
          
          
             [comportamento civilizado da comunidade](%{base_url}/guidelines) en todo momento.

        Goza da túa
          
      
badge_granter_spec.rb
          
            .backfill(good_topic)
      }

      # TODO add welcome
      expect(post.user.user_badges.pluck(:badge_id
          
      
post_serializer.rb
          
             @single_post_link_counts.present?

    # TODO: This could be better, just porting the old one over
          
      
nginx.sample.conf
          
            ;
      gzip_static on;
      add_header Cache-Control public;
      # TODO I don't think this break is needed, it
          
          
            ;
      gzip_static on;
      add_header Cache-Control public;
      # TODO I don't think this break is needed, it
          
      
plugin.rb
          
            )
        # TODO: we should fix the callback mess so that the cooked version is available
        # in the
          
      
better_markdown.js
          
             Representation
   *
   *  *TODO* Talk about this :) Its JsonML, but document the node names we use
          
          
             + ")[ \t]+" ),
            indent_re = "(?: {0,3}\\t| {4})";

        // TODO: Cache this regexp for certain depths
          
      
url.js.es6
          
             cleanup event
    Em.run.scheduleOnce('afterRender', Discourse.Route, 'cleanDOM');

    // TODO: Extract
          
      
poll.js.es6
          
            );
        }
      }

      // TODO: remove non whitelisted content

      // add option id (hash)
      for (let
          
      
list-view-mixin.js.es6
          
            // TODO: remove unused: false
/* jshint unused: false*/
import Ember from 'ember';
import
          
          
            :ember-list-view-grid:ember-list-view-list'],
  scrollTop: 0,
  bottomPadding: 0, // TODO: maybe this can
          
      
htmlparser.js
          
             {
            //TODO: end of tag?
            //TODO: push to pending?
            state.needData
          
          
            ) { //TODO: is this needed?
                    state.lastTag.raw += state.data.substr(state.pos
          
      
discuz_x.rb
          
            }
             OFFSET #{offset};")

      break if results.size < 1

      # TODO: breaks the scipt
          
          
            '],
          active: true,
          salt: user['salt'],
          # TODO: title: user['customstatus
          
      
user_action.rb
          
            (requires_new: true) do
      begin
        # TODO there are conditions when this is called and user_id was
          
      
badge_granter.rb
          
             sql.match(/:backfill/)
    end

    # TODO these three conditions have a lot of false negatives
          
      
post_revisor.rb
          
            ?(:skip_validations)

    Post.transaction do
      revise_post

      # TODO: these callbacks are
          
      
post.js.es6
          
            ({

  @computed()
  siteSettings() {
    // TODO: Remove this once one instantiate all `Discourse
          
      
client.es.yml
          
            : "Nuestros Moderadores"
      stat:
        all_time: "Todo el tiempo"
        last_7_days: "Últimos
          
          
             problemas de conexión)"
        select_all: "Seleccionar todo"
      change_password:
        success
          
      
mousetrap.js
          
            
                    //
                    // @todo make deleting its own method?
                    var deleteCombo
          
          
             in the
     * _directMap dict.
     *
     * TODO: actually remove this from the _callbacks
          
      
moment.js
          
            ;
    }

    function loadLocale(name) {
        var oldLocale = null;
        // TODO: Find a better way to
          
          
             = [];
            this._shortMonthsParse = [];
        }

        // TODO: add sorting
        // Sorting makes sure
          
      
admin_base.scss
          
            ;
    }
    .controls {
      margin-left: 0;
    }
    // Hide the search checkbox for very small screens
    // Todo
          
          
            ;
    width: 100%;
  }
  background-color: $secondary;
  // Todo: set this properly - it needs to be
          
      
users_controller.rb
          
            ?))
    user_serializer = UserSerializer.new(@user, scope: guardian, root: 'user')

    # TODO remove
          
          
            
    guardian.ensure_can_edit_username!(user)

    # TODO proper error surfacing (result is a Model#save
          
      
post-stream.js.es6
          
            (); }
    }

    // TODO: if we have all the posts in the filter, don't go to the server for them.
    this.set
          
          
            ') || 0) - 1
    });

    // TODO unfudge reply count on parent post
  },

  prependPost(post) {
    const stored = this.storePost
          
      
topic_query.rb
          
             new_results(options={})
    # TODO does this make sense or should it be ordered on created_at
    #  it is
          
          
            '
        # TODO forces a table scan, slow
        return result.references(:categories).order(TopicQuerySQL
          
      
jquery.ui.widget.js
          
            ;
			};
		})();
	});
	constructor.prototype = $.widget.extend( basePrototype, {
		// TODO: remove support
          
      
topic_user.rb
          
            )

    # TODO this needs some reworking, when we mark stuff skipped
    # we up these numbers so they are not
          
      
post_creator.rb
          
            )
  #
  def initialize(user, opts)
    # TODO: we should reload user in case it is tainted, should take in
          
      
topic.js.es6
          
            ("creator");
  },

  @computed('fancy_title')
  fancyTitle(title) {
    // TODO: `siteSettings
          
      
composer.js.es6
          
            ": "reply-where-modal" });
        return;
      }
    }

    var staged = false;

    // TODO: This
          
      
application_controller.rb
          
            "

    # TODO should not be invoked on redirection so this should be further deferred
          
      
user.rb
          
             > 0
                  )', 'master_id') }

  scope :staff, -> { where("admin OR moderator") }

  # TODO-PERF: There is no indexes on
          
          
            , username.downcase, uploaded_avatar_id)
  end

  def self.system_avatar_template(username)
    # TODO it
          
      
client.pt_BR.yml
          
             administrativas do tópico"
    emails_are_disabled: "Todo o envio de email foi globalmente desabilitado
          
          
             dia"
        all:
          title: "Tempo Todo"
        yearly:
          title: "Anualmente
          
      
composer.js.es6
          
            .reopenClass({

  // TODO: Replace with injection
  create(args) {
    args = args || {};
    args
          
      
pretty_text_spec.rb
          
            >known</span></a></p>")
    end

    # TODO does it make sense to generate hashtags for tags that
          
      
topic_query_spec.rb
          
            ([tagged_topic1.id, tagged_topic2.id, tagged_topic3.id].sort)

        # TODO: topics with ALL of the given
          
      
post.rb
          
            )
  end

  # TODO: move to post-analyzer?
  # Determine what posts are quoted by this post
  def
          
      
search.rb
          
            
    # TODO rmmseg is designed for chinese, we need something else for Korean / Japanese
    if
          
      
topic.js.es6
          
            ')
  browseMoreMessage(model) {

    // TODO decide what to show for pms
    if (model.get('isPrivateMessage
          
      
posts_controller.rb
          
            ] = params[:image_sizes]
      # TODO this does not feel right, we should name what meta_data is
          
      
server.pt_BR.yml
          
             discussões e encontrar pessoas interessantes em conversas quando todo mundo tem uma imagem de perfil única
          
          
             \"nofollow\" para todo conteúdo incluído por um usuário, exceto links internos (incluindo sub domínios
          
      
server.es.yml
          
            :"
  num_participants: "Participantes:"
  read_full_topic: "Leer todo el tema"
  private_message_abbrev: "Msj
          
          
             rel nofollow a todo el contenido introducido por los usuarios, excepto por los enlaces entrantes
          
      
select2.js
          
            ) {
                        // TODO - replace query.page with query so users have access to term, page
          
          
            ); });
            query.callback(filtered);
        };
    }

    // TODO javadoc
    function tags(data
          
      
server.pt.yml
          
             a encontrarem todo o conteúdo. Se outras partes do seu sítio estão em outros domínicios, adicione-os
          
          
            :
    title: "Termos de Serviço"
    body: |
      Os seguintes termos e condições governam todo o uso do
          
      
virtual-dom.js
          
            (vNode, patch, index) {
    // TODO: Make this a single walk, not two
    unhook(vNode, patch, index
          
      
topic.rb
          
              # TODO: can replace with posters_summary once we remove old list code
  attr_accessor :participants
          
      
jquery.debug.js
          
            
							// TODO: identify versions
							// getElementById can match elements by name instead of ID
							if
          
          
            , Webkit
						// TODO: identify versions
						// getElementById can match elements by name instead of ID
          
      
es6-module-transpiler.js
          
            ;
    }
    // TODO: Implement the rest of @iter and move it to a different file that
    // gets compiled
          
          
            '() {
      return IterModule;
    }
  });

  // TODO(arv): Don't export this.
  global.Deferred