Giter Club home page Giter Club logo

krudmin's People

Contributors

dependabot[bot] avatar djavier avatar markmercedes avatar nivla avatar olidm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

krudmin's Issues

Define roadmap for first stable release

  • DateTime field
  • Email Field
  • Belongs to Link for relations in show page
  • Layout API
  • Spanish Translations
  • Stand Alone controllers that don't depend on having a resource manager but are able to display content using the app template
  • Generators
  • Code Documentation
  • Wiki
  • Publish Gem
  • Deploy Sample App
  • Promote project in ruby toolbox, etc..

Create action buttons API

  • Buttons will have internal logic and they will decide wether or not they are displayable based on their context and policy permissions for the given resource
class AddButton < Button::Base
  def initialize(policy, action_path)
    @policy, @action_path = policy, action_path
  end

  def to_s
    = link_to(new_resource_path, class: 'btn btn-success') do
      %i.fa.fa-plus
      = t('krudmin.actions.add_new')
  end

  def render
    to_s if policy.new?
  end
end

AddButton.for(policy, new_resource_path)

create corresponding view helpers for buttons, this will prevent the need of invoking full names for button classes inside the views

= Krudmin::ActionButtons::AddButton.new(self, new_resource_path)

= add_button(self, new_resource_path)

Generators for common classes

  • Field
  • Action Buttons
  • Theme
  • Controller
  • Resource Manager
  • Managed Resource (Controller + Resource Manager + Specs)
  • Policy

CustomController with no respective view created return random error

After adding a new controller inheriting Krudmin:CustomController and no views created yet,
the following error is shown, instead of a more guiding error about the resource missing:
image

And it is actually misleading because Krudmin:CustomController is not supposed to be controlled by a ResourceManager, yet the error says is looking for one.

Allow configuring searchable field label

Given that i want to search for an entity's id property, the framework currently removes the id from the field name, i want to be able to explicitly say entity id on the search panel.

as an example see the lister field on the bottom right of the following image

screenshot 2018-05-01 09 43 21

a possible DSL could be
SEARCHABLE_ATTRIBUTES = [:title, :id, :source, :expires_on, :category_id, :area_id, :lister_first_name, :lister_last_name, lister_id: "Lister ID"]

or maybe even pass down options

SEARCHABLE_ATTRIBUTES = [:title, :id, :source, :expires_on, :category_id, :area_id, :lister_first_name, :lister_last_name, lister_id: {label: 'Lister ID'}]

Remove direct dependency from pundit, only provide adapter module

  • Move pundit inclusion to sample app, the basic gem only should provide an adapter in order to work with pundit.
  • The needed logic about the pundit integration belongs in the sample app, the client app is the one that also should install the pundit gem.
  • Create documentation page explaining how to use pundit as the authorization library.

Do not allow to destroy sub objects

Add a flag for Krudmin:Fields:HasMany that does not allow the _destroy attribute and no delete button is render on the _has_many_fields partial.

Add the ability to specify date format in data attribute for date and dateTime input controls

e.g:

{format: this.data('date-format')}
  $('.datetimepicker').daterangepicker(
    $.extend({
      timePicker: true,
      locale: {
        format: "MM/DD/YYYY hh:mm A"
      }
    }, inputDefaults)
  , function(inputValue) {
    this.element.val(inputValue.format("MM/DD/YYYY hh:mm A"));
  });

  $('.datepicker').daterangepicker(
    $.extend({
      locale: {
        format: "MM/DD/YYYY"
      }
    }, inputDefaults),
    function(inputValue) {
      this.element.val(inputValue.format("MM/DD/YYYY"));
    }
  );

Layout API

Allows to configure the theme used, by default the theme under the application will be used, a configuration option should be provided in order to change the default theme.

Organize theme files under logical theme structure

Add custom renderers by field

Add renderers for each field type and allow to specify a custom renderer for a specific field from the resource manager.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.