<commit_before>class AnnouncementPane extends ActivityPane

  constructor: (options, data) ->
    options.cssClass = "activity-pane announcement-pane #{options.type}"
    super options, data

  viewAppended: ->
    super()

    # TODO: this will be a false negative if the roles are not loaded yet.
    #       this should be fixed upstream by making sure the roles are
    #       available when the page is loaded. C.T.
    @input.hide()  unless 'admin' in KD.config.roles

  createContentViews: ->
    data = @getData()
    options = @getContentOptions()

    @mostRecent = @createMostRecentView options, data

    # TODO: enabling search results is OK, but the input needs a close box.

    # @searchResults = @createSearchResultsView options, data

  createInputWidget: ->
    super "Enter announcement here"

  createSearchInput: ->
    # TODO: remove this stub method when re-enabling announcement search.

  getPaneData: ->
    [
      {
        name          : 'Most Recent'
        view          : @mostRecent
        closable      : no
        hiddenHandle  : yes<commit_msg>Activity: adding the inputwidget the right way for announcements<commit_after>class AnnouncementPane extends ActivityPane

  constructor: (options, data) ->
    options.cssClass = "activity-pane announcement-pane #{options.type}"
    super options, data


  viewAppended: ->

    @addSubView @channelTitleView
    KD.singletons.mainView.ready =>
      @addSubView @input  if 'admin' in KD.config.roles
      @addSubView @tabView


  createContentViews: ->
    data = @getData()
    options = @getContentOptions()

    @mostRecent = @createMostRecentView options, data

    # TODO: enabling search results is OK, but the input needs a close box.

    # @searchResults = @createSearchResultsView options, data

  createInputWidget: ->
    super "Enter announcement here"

  createSearchInput: ->
    # TODO: remove this stub method when re-enabling announcement search.

  getPaneData: ->
    [
      {
        name          : 'Most Recent'
        view          : @mostRecent
        closable      : no
        hiddenHandle  : yes
{'fraction_non_alphanumeric': 0.08321513002364066, 'fraction_numerical': 0.0, 'mean_word_length': 2.686411149825784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4887253', 'n_tokens_mistral': 596, 'n_tokens_neox': 563, 'n_words': 188}