Sha256: 915502c1acbda5e5cb32ff02ab163e9b59caa4a15fd1e1798edc00a6759c6ac8

Contents?: true

Size: 1.39 KB

Versions: 27

Compression:

Stored size: 1.39 KB

Contents

import React from "react";
import { Settings2 } from "lucide-react";
import { Popover } from "../Popover";

export function FeatureConfigPopover() {
  return (
    <Popover
      trigger={
        <button
          type="button"
          className="p-2 text-gray-400 hover:text-gray-600"
          title="Configure features"
        >
          <Settings2 className="w-5 h-5" />
        </button>
      }
      className="w-96"
    >
      <div className="space-y-4">
        <p className="text-sm text-gray-600">
          Feature options can be configured in the codebase, and loaded in
          initializers:
        </p>

        <div className="bg-gray-50 p-3 rounded-md">
          <code className="text-sm text-gray-800">
            config/initializers/features.rb
          </code>
        </div>

        <p className="text-sm text-gray-600">Example feature implementation:</p>

        <pre className="bg-gray-50 p-3 rounded-md overflow-x-auto">
          <code className="text-xs text-gray-800">
            {`# lib/features/did_convert.rb
module Features
  class DidConvert
    include EasyML::Features

    def did_convert(df)
      df.with_column(
        (Polars.col("rev") > 0)
          .alias("did_convert")
      )
    end
    
    feature :did_convert,
      name: "Did Convert",
      description: "Boolean true/false..."
  end
end`}
          </code>
        </pre>
      </div>
    </Popover>
  );
}

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc27 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc26 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc25 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc24 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc23 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc22 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc21 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc20 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc19 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc18 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc17 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc16 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc15 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc14 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc13 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc12 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc11 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc10 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc9 app/frontend/components/dataset/FeatureConfigPopover.tsx
easy_ml-0.2.0.pre.rc8 app/frontend/components/dataset/FeatureConfigPopover.tsx