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

Add UI-related antigravity changes #2700

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Sep 3, 2023

What does this implement/fix?

Add support for new antigravity table added in pi-hole/pi-hole#5330

This is a follow-up on #2618 which was force-closed and cannot be re-opened.

Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team September 3, 2023 18:06
@PromoFaux
Copy link
Member

PromoFaux commented Sep 10, 2023

He no worky :(

image

Payload being generated:

{
  "address": [
    "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/whitelist.txt"
  ],
  "comment": "test",
  "type": "allow"
}

@DL6ER
Copy link
Member Author

DL6ER commented Sep 11, 2023

Oh, yeah, sorry. This is an unexpected regression of me pushing the related changes for pi-hole/FTL#1629 into the same branch. I will revert the last commit in here and open a new PR for the latter.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@yubiuser
Copy link
Member

As the last commit addresses RegexID, I'll report a small visual glitch when a RegEx is trigged by CNAME
Screenshot at 2023-09-14 21-01-34

@rdwebdesign
Copy link
Member

I'll report a small visual glitch when a RegEx is trigged by CNAME

This is a design issue. Maybe we can improve the layout of this "details" section (using flex columns or making some other changes) to avoid this overlapping.

@DL6ER
Copy link
Member Author

DL6ER commented Sep 14, 2023

You know, I am by no means a web designer. Concerning web design, I'm all in "Adam mode" (that is: throw several things against a wall and, as soon as something sticks, run away as fast as possible).

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general: are we using the term "blocklist", "adlist" or "denylist" in v6?


L 37
placeholder="Adlist description (optional) > placeholder="List description (optional)

L44
after modifying your adlists. > after modifying your lists

@@ -480,28 +496,29 @@ function delItems(ids) {
});
}

function addAdlist() {
function addAdlist(event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function addAdlist(event) {
function addList(event) {

@@ -13,7 +13,8 @@ var GETDict = {};
$(function () {
GETDict = utils.parseQueryString();

$("#btnAdd").on("click", addAdlist);
$("#btnAddAllow").on("click", { type: "allow" }, addAdlist);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$("#btnAddAllow").on("click", { type: "allow" }, addAdlist);
$("#btnAddAllow").on("click", { type: "allow" }, addList);

@@ -13,7 +13,8 @@ var GETDict = {};
$(function () {
GETDict = utils.parseQueryString();

$("#btnAdd").on("click", addAdlist);
$("#btnAddAllow").on("click", { type: "allow" }, addAdlist);
$("#btnAddBlock").on("click", { type: "block" }, addAdlist);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$("#btnAddBlock").on("click", { type: "block" }, addAdlist);
$("#btnAddBlock").on("click", { type: "block" }, addList);

@DL6ER
Copy link
Member Author

DL6ER commented Sep 16, 2023

In general: are we using the term "blocklist", "adlist" or "denylist" in v6?

"Blocklist" for gravity domains, "denylist" for manually added domains on the "domainlist" of type "denied" (may be exact or regex). I don't think "adlist" should be used anywhere as the lists block and maybe more than just ads (e.g., adult content, etc.).

@PromoFaux
Copy link
Member

Interesting behaviour when toggling an allowlist from the web interface:

fucky

DL6ER and others added 2 commits September 27, 2023 21:31
Signed-off-by: DL6ER <dl6er@dl6er.de>
Fix the "Cannot read properties of undefined" error:
- The `function editAdlist(event)` wasn't receiving any arguments,
  because every call to this function is not passing arguments, so
  `event` was undefined.

Using `data-type` attribute to pass the value and avoid the error.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
@rdwebdesign
Copy link
Member

After the last commits here and FTL, it's working:
fixed

@PromoFaux PromoFaux merged commit 7121404 into development-v6 Sep 29, 2023
7 checks passed
@PromoFaux PromoFaux deleted the new/antigravity branch September 29, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants