Home Support Feature Requests Improvments

This topic contains 4 replies, has 2 voices, and was last updated by  Donna 2 years, 4 months ago.

  • Author
    Posts
  • #3694

    Tobias Binna

    First of all, thanks for the great Book Review plugin. This saved me a lot of time to develop on my own.

    Now, when I wanted to configure the plugin for a client I noticed a few small things that I wanted to place as suggestions to improve:

    1. In book-review-public.php it would be good if the top div has a class attribute book-review instead of a id attribute book-review: <div class="book-review" ...
      Semantically id here is not correct because I potentially can have multiple divs with the same id on my page.
    2. In class-book-review-public.php it would be good to only add $style = 'border-style: solid;'; if $border_width is actually set or greater then 0. My problem here is that I cannot remove the border. If border-style is added conditionally, I can choose not to render the border.
    3. I sometimes paste ISBN numbers from online resources which include dashes (-). Would be nice to do a simple str_replace to remove all dashes from the input string before calling the API. This would save me the little work of removing them every time before I submit the request.

    Feel free to contact me if you have any questions on my suggestions.

    Thanks!

    #3704

    Donna
    Keymaster

    Hi Tobias,

    Thank you for your suggestions!

    Can you provide a use case where there could possibly be more than one book review on a single page or post? I’m wary of changing the ID to a class because others may have already written CSS that attaches to #book-review, so I’d like to clarify the use case before deciding what to do.

    Would you care to submit a pull request on Github to address your other suggestions?

    Thx.

    #3705

    Tobias Binna

    Hey Donna,

    I think on a single page or post it won’t happen that you have two reviews. I was more thinking of a blog feed where each feed entry is a post with a book review. I think it is ok, it works and I understand that your concern of breaking other peoples code or styles.

    No problem, I will submit a pull request for the other issues. Thanks for the link to the repo.

    #3737

    Donna
    Keymaster

    Hi Tobias,

    Thanks for the pull request. If all is well, it will go out with the next release, although I’m not sure when that will be just yet.

    #3823

    Donna
    Keymaster

    Hi Tobias,

    Your changes went out in version 2.3.8 of the plugin that was released yesterday. Thanks so much for the PR!

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Feature Requests’ is closed to new topics and replies.