Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dpi created an issue. See original summary.

arvind.kinja’s picture

Version: 2.x-dev » 8.x-1.7
arvind.kinja’s picture

StatusFileSize
new3.07 KB

Patch file to configure the expiry days from the site backend.
The configuration form can be found at /admin/config/content/preview-link

arvind.kinja’s picture

arvind.kinja’s picture

StatusFileSize
new3.26 KB
megha_kundar’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: preview-link-configure-expiry-days.patch, failed testing. View results

dpi’s picture

Version: 8.x-1.7 » 2.x-dev
Status: Needs work » Active

We're not looking to have this for the 1.x branch. Please dont change the version.

Almost all of the patch is unusable since it doesnt actually address any of the configuration of Preview Link.

- It doesnt expose a UI for any existing config, it tries to introduce NEW config.
- Permission is too generic
- Copy paste issues from other projects

Setting back to Active since the patch to date should be mostly ignored.

nterbogt made their first commit to this issue’s fork.

nterbogt’s picture

I've redone the permission form configuration. Also moved it to a merge request.

I still need to implement the bundle configuration, but the rest is done, as far as I know.

nterbogt’s picture

Status: Active » Needs review

This is ready for a review please.

acbramley’s picture

Version: 2.x-dev » 2.1.x-dev

Let's rebase this against 2.1.x.

I'm not sure what the 2.x branch was created for but it's effectively dead.

acbramley’s picture

Status: Needs review » Needs work
acbramley’s picture

Status: Needs work » Needs review

My bad, looks like it already is!

acbramley’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

There's some fairly complex logic in that form that needs tests. Also pushing some linting updates.

nterbogt’s picture

I agree with the complex logic in the form, I'm also not really sure about a decent approach to test that. Do you have any recommendations?

A unit test that just checks the default values and possible options could work, but might not be what you're after.

acbramley’s picture

@nterbogt a unit test isn't going to test the form. It should be a functional test that submits the form and checks the config after the fact.

nterbogt’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

Added a functional test for the settings form. Has a phpstan warning, but it's the same warning in a lot of other projects.

https://git.drupalcode.org/project/token/-/jobs/275660

The warning is documented here.

https://www.drupal.org/docs/develop/development-tools/phpstan/handling-u...

larowlan’s picture

Left a couple of questions on the MR

  • acbramley committed bbedd516 on 2.1.x authored by nterbogt
    Issue #3156692 by nterbogt, acbramley, arvind.kinja, larowlan: Provide...
acbramley’s picture

Status: Needs review » Fixed

Thanks all.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

stephen-cox’s picture

Great to see an admin UI for this. Any chance of a new release including this?

The admin UI is useful for use as part of this issue https://github.com/localgovdrupal/localgov/issues/600. As an interim I've created a PR to use the dev branch (https://github.com/localgovdrupal/localgov/pull/691), but would be nice if we didn't have to reference specific commits in the dev branch.

acbramley’s picture