Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Deprecate BaseCollector and BaseRenderer #413

Merged
merged 1 commit into from Apr 9, 2022

Commits on Apr 2, 2022

  1. refactor: Deprecate BaseCollector and BaseRenderer

    The BaseCollector and BaseRenderer are merged into
    the BaseHandler (as mixins for now).
    Developers are still able to create collectors
    and renderers using these deprecated base classes,
    and pass instances of them when creating their handler.
    
    All the methods of the deprecated bases can now
    be defined on the BaseHandler subclass itself.
    Handlers can then be instantiated by passing
    the handler's name, the theme and the optional
    custom templates folder name/path.
    
    Reasoning: often times, the renderer and the collector
    need to communicate or share data. For example,
    the Crystal renderer uses the collector to lookup names
    when creating cross-references. The Python handlers
    are able to filter members when collecting/returning data,
    and need the same members list when rendering,
    to order the elements based on that list.
    
    This change is the first of two, where the second change
    will deprecate the use of `selection` and `rendering` keys
    in the YAML options or MkDocs configuration, in favor of
    a single `options` key that both the collection and rendering
    process will share.
    pawamoy committed Apr 2, 2022
    Copy the full SHA
    8272200 View commit details
    Browse the repository at this point in the history