<commit_before>import Fluxxor from "fluxxor";
import React from "react";
import ContextMenuItem from "./context_menu_item.jsx";

export default React.createClass({
  mixins: [
    Fluxxor.FluxMixin(React),
    Fluxxor.StoreWatchMixin('contextmenu')
  ],

  getStateFromFlux: function() {
    var flux = this.getFlux();
    var ctx = flux.store("contextmenu").getState();
    return {
      style: {
        display: (ctx.display ? "block" : "none"),
        position: "absolute",
        top: ctx.pos.top,
        left: ctx.pos.left
      },
      items: ctx.items
    };
  },

  render() {
    return <ul className="contextmenu" style={this.state.style}>
      {this.state.items.map((item) => {
        return <ContextMenuItem item={item} />;<commit_msg>Fix context menu when not RT<commit_after>import Fluxxor from "fluxxor";
import React from "react";
import ContextMenuItem from "./context_menu_item.jsx";

export default React.createClass({
  mixins: [
    Fluxxor.FluxMixin(React),
    Fluxxor.StoreWatchMixin('contextmenu')
  ],

  getStateFromFlux: function() {
    var flux = this.getFlux();
    var ctx = flux.store("contextmenu").getState();
    return {
      style: {
        display: (ctx.display ? "block" : "none"),
        position: "absolute",
        top: ctx.pos.top,
        left: ctx.pos.left
      },
      items: ctx.items.filter((item) => item)
    };
  },

  render() {
    return <ul className="contextmenu" style={this.state.style}>
      {this.state.items.map((item) => {
        return <ContextMenuItem item={item} />;
{'fraction_non_alphanumeric': 0.15051679586563307, 'fraction_numerical': 0.0, 'mean_word_length': 2.982005141388175, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, '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': '910331', 'n_tokens_mistral': 504, 'n_tokens_neox': 490, 'n_words': 104}